/* ==========================================================================
   软件开发公司官网 - 公共样式文件
   作者: Senior Front-End Architect
   版本: 1.0.0
   描述: 响应式设计，兼容PC、平板、手机
   ========================================================================== */

/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* 响应式图片 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 链接样式 */
a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* 按钮基础样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-height: 48px;
  user-select: none;
  outline: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: 0;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #0958d9 0%, #1677ff 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(9, 88, 217, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(9, 88, 217, 0.4);
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(9, 88, 217, 0.3);
}

.btn-secondary {
  background: rgba(9, 88, 217, 0.05);
  color: #0958d9;
  border: 2px solid #0958d9;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: #0958d9;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(9, 88, 217, 0.3);
}

.btn-secondary:active {
  transform: translateY(-1px);
}

/* 按钮尺寸变体 */
.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  min-height: 40px;
  border-radius: 10px;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 18px;
  min-height: 56px;
  border-radius: 14px;
}

/* 按钮状态 */
.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled:hover,
.btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* 加载状态 */
.btn.loading {
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

/* 图标按钮 */
.btn-icon {
  padding: 12px;
  min-width: 48px;
  border-radius: 50%;
}

.btn-icon.btn-sm {
  padding: 8px;
  min-width: 40px;
}

.btn-icon.btn-lg {
  padding: 16px;
  min-width: 56px;
}

/* 按钮动画 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 响应式按钮 */
@media (max-width: 768px) {
  .btn {
    padding: 12px 24px;
    font-size: 15px;
    min-height: 44px;
  }

  .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 36px;
  }

  .btn-lg {
    padding: 16px 32px;
    font-size: 17px;
    min-height: 52px;
  }
}

/* 容器布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 网格系统 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  padding: 0 15px;
}

.col-1 {
  flex: 0 0 8.333333%;
}
.col-2 {
  flex: 0 0 16.666667%;
}
.col-3 {
  flex: 0 0 25%;
}
.col-4 {
  flex: 0 0 33.333333%;
}
.col-6 {
  flex: 0 0 50%;
}
.col-8 {
  flex: 0 0 66.666667%;
}
.col-12 {
  flex: 0 0 100%;
}

/* 头部导航样式 */
.header {
  background: rgba(255, 255, 255, 0.95);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #0958d9;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  color: #333;
  font-weight: 500;
  position: relative;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  width: 0;
  height: 2px;
  background: #0958d9;
  transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #0958d9;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: calc(100% - 32px);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(9, 88, 217, 0.15);
  background: rgba(9, 88, 217, 0.08);
  box-shadow: 0 1px 6px rgba(9, 88, 217, 0.15);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(9, 88, 217, 0.12);
  box-shadow: 0 3px 10px rgba(9, 88, 217, 0.2);
  transform: translateY(-1px);
}

.menu-toggle:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(9, 88, 217, 0.15);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #0958d9;
  border-radius: 1.5px;
  margin: 2px 0;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}

/* 页面主体内容 */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

/* 节区通用样式 */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 36px;
  color: #333;
  margin-bottom: 15px;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #0958d9;
}

.section-title p {
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(9, 88, 217, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: #0958d9;
}

.card-image {
  width: 100%;
  height: 200px;
  background: #0958d9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content {
  padding: 30px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.card-text {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* 页脚样式 */
.footer {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  color: white;
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(9, 88, 217, 0.5), transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
}

.footer-section {
  transition: transform 0.3s ease;
}

.footer-section:hover {
  transform: translateY(-5px);
}

.footer-section h3 {
  margin-bottom: 25px;
  color: #0958d9;
  font-size: 1.25rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #0958d9;
  border-radius: 1px;
}

.footer-section p,
.footer-section li {
  margin-bottom: 12px;
  color: #cbd5e0;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #cbd5e0;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.footer-section a:hover {
  color: #0958d9;
  transform: translateX(5px);
}

.footer-section a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #0958d9;
  transition: width 0.3s ease;
}

.footer-section a:hover::before {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0aec0;
  position: relative;
}

.footer-bottom a {
  color: #0958d9;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #3182ce;
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    transition: left 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-4px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -5px);
  }

  .section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .col-4,
  .col-6 {
    flex: 0 0 100%;
  }
}

/* 响应式设计 - 手机 */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .section {
    padding: 40px 0;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .card-content {
    padding: 20px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0958d9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 可访问性优化 */
.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;
}

/* 焦点样式 */
*:focus {
  outline: 2px solid #0958d9;
  outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .btn-primary {
    background: #000;
    border: 2px solid #000;
  }

  .card {
    border: 1px solid #000;
  }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
