/* 1farl - 雄安万法奥品牌样式 */
:root {
  --brand-blue: #165DFF;
  --brand-blue-light: #E8F0FF;
  --brand-gold: #FF9F29;
  --brand-gold-light: #FFF4E6;
  --dark-bg: #0F172A;
  --light-bg: #F8FAFC;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* 通用容器（与 Tailwind 的 container 配合使用，本身不带 padding） */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 品牌色工具 */
.text-brand-blue { color: var(--brand-blue); }
.text-brand-gold { color: var(--brand-gold); }
.bg-brand-blue { background-color: var(--brand-blue); }
.bg-brand-gold { background-color: var(--brand-gold); }
.bg-brand-blue-light { background-color: var(--brand-blue-light); }
.bg-brand-gold-light { background-color: var(--brand-gold-light); }

/* 渐变文字 */
.text-gradient {
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 按钮 */
.btn-main {
  display: inline-block;
  background-color: var(--brand-blue);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-main:hover {
  background-color: #1450D8;
  box-shadow: 0 8px 24px rgba(22, 93, 255, 0.25);
  transform: translateY(-1px);
}

.btn-sub {
  display: inline-block;
  background-color: var(--brand-gold);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-sub:hover {
  background-color: #E68F24;
  box-shadow: 0 8px 24px rgba(255, 159, 41, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--brand-blue);
  color: var(--brand-blue);
  padding: 0.65rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
  cursor: pointer;
}

.btn-outline:hover {
  background-color: var(--brand-blue);
  color: #fff;
}

/* 卡片悬浮效果 */
.card-float {
  transition: all 0.35s ease;
}

.card-float:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 40px rgba(22, 93, 255, 0.12);
}

/* 导航栏 */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.main-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo svg {
  width: 40px;
  height: 40px;
}

.logo span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-bg);
}

.desktop-nav {
  display: none;
}

.desktop-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0;
  margin: 0 1rem;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

/* 移动端菜单 */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  color: var(--text-main);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background-color: var(--brand-blue-light);
  color: var(--brand-blue);
}

/* 页面横幅 */
.page-banner {
  padding-top: 120px;
  padding-bottom: 60px;
  text-align: center;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #0F172A 100%);
  color: #fff;
}

.page-banner h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto;
}

/* 内容区块 */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }
.grid-5 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
}

/* 卡片 */
.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(22, 93, 255, 0.1);
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: var(--brand-blue-light);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* 表单 */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* MD生成器 */
.md-generator {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.md-generator textarea {
  width: 100%;
  min-height: 140px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1rem;
}

.md-result {
  margin-top: 1.5rem;
  display: none;
}

.md-result.show {
  display: block;
}

.md-result pre {
  background: var(--dark-bg);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
}

/* 加载提示 */
.loading-tip {
  display: none;
  text-align: center;
  padding: 1rem;
  color: var(--brand-gold);
  font-weight: 500;
}

.loading-tip.show {
  display: block;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 页脚 */
.main-footer {
  background-color: var(--dark-bg);
  color: #94A3B8;
  padding: 60px 0 30px;
}

.main-footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .main-footer .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.main-footer .logo span {
  color: #fff;
}

.main-footer h4 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.main-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-footer li {
  margin-bottom: 0.75rem;
}

.main-footer a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-footer a:hover {
  color: var(--brand-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

/* 响应式导航显示 */
@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
  .mobile-menu-btn {
    display: none;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.5rem; }
.w-full { width: 100%; }
