/* ============================================================
   兰启网站 — 视觉美化增强层
   不改变任何功能/ID/JS/表单结构，仅升级视觉体验
   ============================================================ */

/* --- 品牌色彩体系强化 --- */
:root {
  --primary: #0A2E5C;
  --primary-light: #164278;
  --primary-lighter: #1e5a9e;
  --accent: #C9A961;
  --accent-light: #dcc28a;
  --accent-soft: rgba(201, 169, 97, 0.12);
  --surface-card: #ffffff;
  --text-body: #334155;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(10, 46, 92, 0.06), 0 1px 2px rgba(10, 46, 92, 0.04);
  --shadow-md: 0 4px 20px rgba(10, 46, 92, 0.08);
  --shadow-lg: 0 10px 40px rgba(10, 46, 92, 0.12);
  --shadow-xl: 0 20px 60px rgba(10, 46, 92, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* --- 全局平滑渲染 --- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
}

/* --- Header 强化 --- */
.header-blur {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(10, 46, 92, 0.06);
  transition: all 0.3s ease !important;
}

header.shadow-lg {
  box-shadow: 0 1px 20px rgba(10, 46, 92, 0.08) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.nav-link {
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  color: #1e293b;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary);
}

/* --- Hero 强化 --- */
.hero-bg {
  background: linear-gradient(135deg, 
    rgba(6, 29, 58, 0.92) 0%, 
    rgba(10, 46, 92, 0.78) 40%, 
    rgba(22, 66, 120, 0.65) 70%, 
    rgba(10, 46, 92, 0.92) 100%
  ), url('/static/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

/* 添加光泽 overlay */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(201, 169, 97, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-bg > * {
  position: relative;
  z-index: 1;
}

.hero-title {
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-buttons {
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- CTA 按钮强化 --- */
.cta-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary-lighter) 100%) !important;
  border: none;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 15px rgba(10, 46, 92, 0.25) !important;
}

.cta-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 30px rgba(10, 46, 92, 0.35) !important;
}

.cta-button:active {
  transform: translateY(0) scale(0.98) !important;
}

.cta-secondary {
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-secondary:hover {
  border-color: white;
  background: white;
  color: var(--primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* --- Trust Badge 强化 --- */
.trust-badge {
  background: linear-gradient(180deg, #f0f4f8 0%, #e8edf4 100%);
}

.trust-item {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem 1.5rem;
  border: 1px solid rgba(10, 46, 92, 0.04);
}

.trust-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 169, 97, 0.15);
}

.trust-number {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--primary-lighter) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* --- Service Cards 强化 --- */
.service-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(10, 46, 92, 0.04);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 169, 97, 0.1);
}

.service-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 20px rgba(10, 46, 92, 0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.service-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-md) + 2px);
  background: linear-gradient(135deg, var(--accent), var(--primary));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-3deg);
  border-radius: 14px;
}

.service-card:hover .service-icon::after {
  opacity: 1;
}

.service-card:hover .service-card-icon {
  transform: scale(1.1);
}

/* --- Value Cards 强化 --- */
.value-section {
  position: relative;
  background: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 50%, #f0f4f8 100%);
}

.value-card {
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(10, 46, 92, 0.04);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 169, 97, 0.1);
}

.value-icon {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 25px rgba(10, 46, 92, 0.2);
  transition: all 0.4s ease;
}

.value-card:hover .value-icon {
  transform: scale(1.08);
  box-shadow: 0 12px 35px rgba(10, 46, 92, 0.3);
}

/* --- Case Cards 强化 --- */
.case-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(10, 46, 92, 0.04);
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.case-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.case-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(10, 46, 92, 0.08));
  pointer-events: none;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-card:hover .case-image img {
  transform: scale(1.08);
}

.case-badge {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: inline-block;
}

/* --- 保函查询区域 --- */
#guarantee-query .bg-white.rounded-2xl.shadow-xl {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid rgba(10, 46, 92, 0.04);
}

/* --- Contact Section 强化 --- */
.contact-form-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(10, 46, 92, 0.04);
}

.form-input {
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: all 0.25s ease;
  background: #fafbfc;
  font-size: 0.9375rem;
}

.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(10, 46, 92, 0.08);
  outline: none;
}

.form-input:hover {
  background: white;
  border-color: #cbd5e1;
}

.form-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
}

.contact-info-card {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(10, 46, 92, 0.3);
  padding: 2.5rem !important;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

/* --- Footer 强化 --- */
.footer {
  background: linear-gradient(180deg, #162033 0%, #0f172a 100%);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  opacity: 0.6;
}

.footer-link {
  color: #94a3b8;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--accent) !important;
  padding-left: 4px;
}

/* --- Section Titles 强化 --- */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* --- Admin Float Button 强化 --- */
.admin-float-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
  box-shadow: 0 6px 25px rgba(10, 46, 92, 0.35) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-float-button:hover {
  transform: scale(1.1) translateY(-4px) !important;
  box-shadow: 0 10px 35px rgba(10, 46, 92, 0.45) !important;
}

/* --- Modal 强化 --- */
.modal-overlay {
  background: rgba(6, 29, 58, 0.75) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.modal-content {
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 46, 92, 0.3);
}

.login-button:active {
  transform: translateY(0) scale(0.98);
}

/* --- Scroll Animation 强化 --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 不同位置的延迟 */
#services .animate-on-scroll:nth-child(1).visible { transition-delay: 0s; }
#services .animate-on-scroll:nth-child(2).visible { transition-delay: 0.1s; }
#services .animate-on-scroll:nth-child(3).visible { transition-delay: 0.2s; }
#services .animate-on-scroll:nth-child(4).visible { transition-delay: 0.3s; }

#about .animate-on-scroll:nth-child(1).visible { transition-delay: 0s; }
#about .animate-on-scroll:nth-child(2).visible { transition-delay: 0.1s; }
#about .animate-on-scroll:nth-child(3).visible { transition-delay: 0.2s; }

#cases .animate-on-scroll:nth-child(1).visible { transition-delay: 0s; }
#cases .animate-on-scroll:nth-child(2).visible { transition-delay: 0.1s; }
#cases .animate-on-scroll:nth-child(3).visible { transition-delay: 0.2s; }

/* --- Particles 强化 --- */
.particle {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.25;
  animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { 
    transform: translateY(0) scale(1);
    opacity: 0.25;
  }
  50% { 
    transform: translateY(-30px) scale(1.5);
    opacity: 0.5;
  }
}

/* --- Scrollbar 美化 --- */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #94a3b8, #64748b);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #64748b, #475569);
}

/* --- Focus Ring --- */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Responsive 增强 ===== */

@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll;
  }
  
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-subtitle {
    font-size: 1.05rem !important;
  }
  
  .service-card, 
  .value-card, 
  .case-card {
    padding: 1.5rem 1.25rem;
  }
  
  .modal-content {
    padding: 1.5rem 1.25rem !important;
  }
  
  .section-title {
    font-size: 1.75rem !important;
  }
  
  .trust-number {
    font-size: 2.25rem !important;
  }
  
  .contact-form-wrapper,
  .contact-info-card {
    padding: 1.5rem !important;
  }
  
  .admin-float-button {
    width: 52px !important;
    height: 52px !important;
    bottom: 20px !important;
    right: 20px !important;
  }

  /* 移动端卡片间距优化 */
  #services .grid,
  #about .grid,
  #cases .grid {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.625rem !important;
  }
  
  .cta-button,
  .cta-secondary {
    padding: 0.875rem 1.75rem !important;
    font-size: 0.9375rem !important;
  }
  
  .service-icon {
    width: 60px !important;
    height: 60px !important;
  }
  
  .value-icon {
    width: 72px !important;
    height: 72px !important;
  }
  
  .trust-item {
    padding: 1.25rem 1rem !important;
  }
}

/* --- 平板优化 --- */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-title {
    font-size: 2.75rem !important;
  }
}
