/* 全局样式 */
:root {
  --primary-color: #ff6b35;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --bg-color: #f8f9fa;
  --text-color: #333;
  --text-light: #666;
  --white: #fff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 导航栏 - 移动端优先设计 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  padding: 10px 0;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: 120px;
}

@media (max-width: 768px) {
  .logo-img {
    height: 35px;
    max-width: 100px;
  }
  
  .navbar {
    padding: 0 15px;
    height: 50px;
  }
  
  .hero-content {
    flex-direction: column !important;
    text-align: center;
    gap: 20px;
    padding: 0 10px;
  }
  
  .hero-text {
    max-width: 100% !important;
    order: 2;
    width: 100%;
  }
  
  .hero-carousel {
    max-width: 100% !important;
    height: 200px;
    order: 1;
    margin: 10px auto;
  }
  
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }
  
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }
  
  .promise-badge {
    padding: 8px 15px;
    font-size: 0.85rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    min-height: 45px;
  }
  
  .hero-phone {
    font-size: 1rem;
  }
  
  .hero-phone a {
    font-size: 1rem;
  }
}

.logo-icon {
  font-size: 24px;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  height: 2px;
  width: 100%;
  background: var(--text-color);
  transition: var(--transition);
  transform-origin: center;
}

/* 移动端菜单 */
.mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-link {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  color: var(--text-color);
  transition: var(--transition);
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

.mobile-nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  background: #fff3e0;
  border-radius: var(--border-radius);
  justify-content: center;
  margin-top: 10px;
  font-weight: bold;
  color: var(--primary-color);
}

/* 主内容区 */
main {
  margin-top: 60px;
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #ff8c5a);
  color: var(--white);
  padding: 100px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  
  .hero-text {
    flex: 1;
    max-width: 50%;
  }
  
  .hero-carousel {
    flex: 1;
    max-width: 50%;
  }
}

.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 300px;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  margin: 20px auto;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}

@media (max-width: 767px) {
  .hero-carousel {
    max-width: 90%;
    height: 200px;
    margin: 15px auto;
  }
  
  .hero-content {
    padding: 0 15px;
  }
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 20px;
  opacity: 0.95;
}

.promise-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 30px;
  margin-bottom: 25px;
  font-size: 1rem;
  font-weight: bold;
  border: 2px solid rgba(255,255,255,0.5);
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(255,255,255,0.5); }
  50% { border-color: rgba(255,255,255,1); }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 20px;
}

.btn {
  padding: 15px 25px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--white);
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary-color);
}

.btn-pulse {
  animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,53,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(255,107,53,0); }
}

.hero-phone {
  font-size: 1.1rem;
  margin-top: 20px;
}

.hero-phone a {
  color: var(--white);
  font-weight: bold;
  text-decoration: underline;
}

/* 服务介绍 */
.features {
  padding: 60px 20px;
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--secondary-color);
  font-weight: 600;
}

.features-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--bg-color);
  padding: 25px 20px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-card.highlight {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 2px solid var(--primary-color);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
  font-weight: 600;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 案例展示 */
.cases {
  padding: 60px 20px;
  background: var(--bg-color);
}

.cases-grid {
  max-width: 800px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.case-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.case-image {
  height: 150px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  overflow: hidden;
}

.case-content {
  padding: 20px;
}

.case-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 600;
}

.case-location {
  color: #666;
  font-size: 0.9rem;
  margin: 8px 0;
}

.case-status {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.case-status.found {
  background: #d4edda;
  color: #155724;
}

.case-status.searching {
  background: #fff3cd;
  color: #856404;
}

.case-status.closed {
  background: #e2e3e5;
  color: #383d41;
}

.more-cases {
  text-align: center;
  margin-top: 20px;
}

/* 服务流程 - 移动端优化 */
.process {
  padding: 60px 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.process-steps-mobile {
  max-width: 500px;
  margin: 0 auto;
}

.process-step {
  background: rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 15px;
  position: relative;
}

.process-step:last-child {
  margin-bottom: 0;
}

.step-circle {
  width: 30px;
  height: 30px;
  background: white;
  color: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  top: 20px;
  left: -15px;
  z-index: 1;
}

.process-step h3 {
  margin: 0 0 8px 25px;
  font-size: 1.1rem;
  font-weight: 600;
}

.process-step p {
  margin: 0 0 0 25px;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* 联系表单 */
.contact {
  padding: 60px 20px;
  background: var(--secondary-color);
  color: var(--white);
}

.contact .section-title {
  color: var(--white);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-info {
  max-width: 100%;
  margin: 0 auto;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 1rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.contact-item span:first-child {
  font-size: 1.2rem;
}

.contact-note {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
}

.contact-note p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.contact-note p:last-child {
  color: #ffd700;
  margin-bottom: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(255,255,255,0.1);
  padding: 25px;
  border-radius: var(--border-radius);
}

.contact-form h3 {
  color: #fff;
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.5);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.contact-form textarea {
  height: 120px;
  resize: vertical;
  min-height: 100px;
}

.contact-form button {
  background: var(--primary-color);
  color: var(--white);
  font-size: 1.1rem;
  margin-top: 10px;
}

#formMessage {
  text-align: center;
  margin-top: 10px;
  color: #4caf50;
  font-weight: bold;
  min-height: 20px;
}

/* 页脚 */
.footer {
  background: #1a252f;
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 20px 20px;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.footer-brand p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.promise-text {
  color: #ffd700;
  font-weight: bold;
  font-size: 0.95rem;
}

.footer-contact h4,
.footer-links h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-contact p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.footer-contact a {
  color: var(--primary-color);
  font-weight: 500;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  padding: 5px 0;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 20px;
}

.footer-bottom p:first-child {
  font-weight: 500;
}

.footer-bottom p:last-child {
  font-size: 0.8rem;
  color: rgba(255,255,255, 0.6);
  margin-top: 8px;
}

/* 响应式设计 - 平板及以上 */
@media (min-width: 768px) {
  .navbar {
    padding: 0 40px;
    height: 70px;
  }
  
  .logo {
    font-size: 24px;
  }
  
  .logo-icon {
    font-size: 32px;
  }
  
  .nav-toggle {
    display: none;
  }
  
  .mobile-menu {
    display: none;
  }
  
  .nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
  }
  
  .hero {
    padding: 120px 40px 100px;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.25rem;
    max-width: 600px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-content {
    flex-direction: row;
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 响应式设计 - 桌面端 */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero p {
    font-size: 1.5rem;
  }
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 焦点可见性 */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 隐藏焦点轮廓的元素 */
[tabindex="-1"]:focus {
  outline: none;
}

/* 可访问性增强 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 动画增强 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card {
  animation: fadeInUp 0.6s ease-out;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 48px;
  }
  
  .feature-card,
  .case-card {
    touch-action: manipulation;
  }
}

/* 无障碍样式 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* 安全区域适配 - 适配iPhone X等刘海屏 */
@supports (bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* 字体大小调整以适应移动设备 */
@media screen and (max-width: 320px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .feature-card h3 {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}