/* =========================================================
   custom.css — 工商财税企业服务平台 自定义样式补充
   说明：布局与响应式主要由 Tailwind CSS v3 完成，
   本文件只补充轮播、FAQ、悬浮客服、时间线等定制样式。
   主色：橙 #f26522 / 深灰 #333 / 文字 #666
   ========================================================= */

:root {
  --brand: #f26522;
  --ink: #333333;
  --muted: #666666;
  --brand-light: #fde3d3;
}

/* ---------- 基础 ---------- */
html {
  scroll-behavior: smooth; /* 锚点平滑滚动 */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

/* 锚点定位时给吸顶导航留出高度 */
section[id] {
  scroll-margin-top: 84px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* ---------- 通用按钮 ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}
.btn-primary:hover {
  background: #d9541a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(242, 101, 34, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: #fff;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* ---------- 顶部导航 ---------- */
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--ink);
  border-radius: 6px;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--brand);
}
/* 当前板块高亮：橙色 + 下划线 */
.nav-link.active {
  color: var(--brand);
  font-weight: 600;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--brand);
}

/* 移动端导航面板展开动画 */
#mobileNav {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}
#mobileNav.nav-hidden {
  max-height: 0;
  opacity: 0;
}
#mobileNav.nav-show {
  max-height: 480px;
  opacity: 1;
}

/* 汉堡按钮三条线 */
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.burger span + span {
  margin-top: 5px;
}
.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 面包屑 ---------- */
.breadcrumb a {
  color: var(--muted);
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--brand);
}
.breadcrumb .crumb-current {
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 轮播 Banner ---------- */
#carTrack {
  transition: transform 0.7s ease-in-out;
}

.car-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}
.car-arrow:hover {
  background: var(--brand);
  color: #fff;
}
@media (max-width: 640px) {
  .car-arrow {
    width: 36px;
    height: 36px;
  }
}

.car-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}
.car-dot.active {
  width: 26px;
  background: var(--brand);
}

/* ---------- 业务卡片 ---------- */
.biz-card .icon-circle {
  transition: all 0.3s ease;
}
.biz-card:hover .icon-circle {
  background: var(--brand);
  color: #fff;
  transform: scale(1.06);
}

/* ---------- 办理流程时间线 ---------- */
.process-step {
  position: relative;
  padding: 0 0 26px 58px;
}
.process-step:last-child {
  padding-bottom: 0;
}
/* 步骤序号圆点 */
.step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: #fff;
  border: 2px solid var(--brand);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  z-index: 2;
}
/* 步骤之间的连接线 */
.process-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 42px;
  bottom: 2px;
  width: 2px;
  background: var(--brand-light);
}

/* ---------- FAQ 折叠面板 ---------- */
.faq-item {
  transition: box-shadow 0.25s ease;
}
.faq-item:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}
.faq-item.open .faq-q-text {
  color: var(--brand);
}

/* ---------- 右侧悬浮客服 ---------- */
.float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  padding: 12px 18px;
  border-radius: 9999px;
  box-shadow: 0 6px 16px rgba(242, 101, 34, 0.35);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  position: relative;
}
.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(242, 101, 34, 0.45);
}
.float-btn.secondary {
  background: var(--ink);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
/* 咨询按钮呼吸光圈 */
.float-btn.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid rgba(242, 101, 34, 0.5);
  animation: pulseRing 2s ease-out infinite;
  pointer-events: none;
}
@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}
/* 手机端悬浮按钮只保留图标 */
@media (max-width: 640px) {
  .float-btn {
    padding: 12px;
  }
  .float-btn .fb-text {
    display: none;
  }
}

/* ---------- 咨询弹窗 ---------- */
.modal-mask {
  animation: fadeIn 0.2s ease;
}
.modal-card {
  animation: popIn 0.25s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ---------- 配置加载失败提示 ---------- */
#configError {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 14px;
  padding: 12px 16px;
  text-align: center;
}
