/* 0. 总体样式 - 使用 CSS 变量定义 shadcn 风格的基础样式 */

:root {
  --background: #ffffff;
  --foreground: #1a1a1a;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  --muted: #94a3b8;
  --border: #e2e8f0;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --accent: #007bff;
  --accent-hover: #0056b3;
}
@font-face {
  font-family: 'Danger';
  src: url('../fonts/Danger.otf');


  font-style: normal;
  font-style: normal;
}
/* 使用 shadcn 的 ring 效果 */
.ring {
  --ring-offset-shadow: 0 0 0 var(--ring-offset-width, 0px) var(--ring-offset-color, #fff);
  --ring-shadow: 0 0 0 calc(3px + var(--ring-offset-width, 0px)) var(--ring-color, #93c5fd);
  box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow);
}

html, body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}
a{
  text-decoration: none;
}
.wrap {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.clear {
  clear: both;
}

/* 1. 头部样式 */
.header {
  background: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-family: 'Danger', sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.logo a:hover {
  color: var(--primary-hover);
}

.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.top-nav li {
  margin-left: 20px;
}

.top-nav li a {
  font-weight: 500;
  color: var(--secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.top-nav li.active a,
.top-nav li a:hover {
  background-color: var(--primary);
  color: #fff;
}

/* 2. 内容区域样式 */
.content {
  padding: 3rem 0;
  background: linear-gradient(to bottom, #f8fafc, #fff);
}

.content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--foreground);
}

.top-service-grids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.top-service-grid {
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.top-service-grid:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.top-service-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.top-service-grid span {
  display: block;
  padding: 1rem;
  font-weight: 500;
  color: var(--foreground);
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
}

/* 3. 底部样式 */
.footer {
  background: var(--foreground);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-grids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-left ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.footer-left li {
  margin-right: 20px;
}

.footer-left a {
  display: block;
  width: 32px;
  height: 32px;
  background-size: cover;
  transition: opacity 200ms ease;
}

.footer-left a.ftwiter {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%231DA1F2" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"/></svg>');
}

.footer-left a.fface {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%231877F2" d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37.35-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"/></svg>');
}

.footer-left a:hover {
  opacity: 0.7;
}

.footer-right {
  position: relative;
}

#toTop {
  display: none;
  text-decoration: none;
  position: fixed;
  bottom: 10px;
  right: 10px;
  overflow: hidden;
  width: 32px;
  height: 32px;
  border: none;
  text-indent: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E") no-repeat;
  background-color: var(--accent);
  border-radius: 50%;
}

#toTopHover {
  width: 32px;
  height: 32px;
  display: block;
  overflow: hidden;
  float: left;
  opacity: 0;
  -moz-opacity: 0;
  filter: alpha(opacity=0);
}

#toTop:hover {
  background-color: var(--accent-hover);
}

/*blur*/
.top-service-grid.blur img {
  filter: blur(10px);
  transition: 2s all;
}
.top-service-grid.blur:hover img{
  filter: blur(0px);
}
/* 4. 响应式设计 */
/* 平板设备 */
@media (max-width: 1024px) {
  .top-service-grids {
    grid-template-columns: repeat(2, 1fr); /* 平板端两列 */
  }
}

/* 移动设备 */
@media (max-width: 768px) {
  .wrap {
    padding: 0 1rem;
  }

  .top-header {
    flex-direction: column;
    gap: 1rem;
  }

  .top-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .top-nav li {
    margin: 0.25rem;
  }

  .content h1 {
    font-size: 1.875rem;
  }

  .top-service-grids {
    grid-template-columns: 1fr; /* 移动端单列 */
  }

  .footer-grids {
    flex-direction: column;
  }

  .footer-left {
    margin-bottom: 20px;
  }

  /* 汉堡菜单 */
  .top-nav {
    display: none; /* 默认隐藏 */
  }

  .top-nav.open {
    display: block; /* 点击后显示 */
  }

  .hamburger {
    display: block;
    cursor: pointer;
  }

  .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--foreground);
  }

  /* 汉堡菜单动画 (可选) */
  .hamburger.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.open .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* 添加汉堡菜单到 HTML */
  .top-header .clear:last-child {
    display: none; /* 隐藏原来的 clear */
  }

  .top-header::after {
    content: '';
    display: table;
    clear: both;
  }

  .top-header .hamburger {
    float: right;
    margin-top: 10px;
  }
}
