/*
 * WGACA Frontend - Public Styles
 * 公共样式文件
 */

body {
  --style-color: #000000;
  --font-color: #ffffff;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

a:hover {
  color: #666;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  margin: 0;
  line-height: 1.3;
}

p {
  margin: 0 0 15px;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

.wide-14 .container {
  max-width: 1400px;
}

.wide-16 .container {
  max-width: 1600px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.row > div {
  padding: 0 15px;
}

/* 栅格系统 */
.col-sm-6 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-lg-4 {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 576px) {
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 992px) {
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--style-color);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #333;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--style-color);
  color: var(--style-color);
}

.btn-outline:hover {
  background: var(--style-color);
  color: #fff;
}

/* 卡片样式 */
.block {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.block:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* 图片缩放效果 */
.scale-img {
  overflow: hidden;
  display: block;
}

.scale-img img {
  transition: transform 0.5s ease;
}

.scale-img:hover img {
  transform: scale(1.05);
}

/* 文字省略 */
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 列表样式 */
.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 文本对齐 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* 间距工具类 */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pt-4 { padding-top: 40px; }
.pt-5 { padding-top: 50px; }

.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }
.pb-4 { padding-bottom: 40px; }
.pb-5 { padding-bottom: 50px; }

/* 响应式隐藏 */
@media (max-width: 767px) {
  .hidden-xs {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .swiper-pagination {
    display: none;
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0 30px;
  }
}

/* 滚动条美化 */
.scrollbar-y {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

.scrollbar-y::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-y::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.scrollbar-y::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* 懒加载占位图 */
.lazyload {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazyload.loaded {
  opacity: 1;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .active {
  background: var(--style-color);
  border-color: var(--style-color);
  color: #fff;
}

/* 表单样式 */
.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--style-color);
}

.form-control::placeholder {
  color: #999;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-group {
  margin-bottom: 20px;
}

/* 面包屑导航 */
.breadcrumb-div {
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #666;
}

.breadcrumb li:not(:first-child)::before {
  content: '/';
  margin: 0 10px;
  color: #999;
}

.breadcrumb li:last-child {
  color: var(--style-color);
}

.breadcrumb li a:hover {
  color: var(--style-color);
}

/* 加载动画 */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--style-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Swiper 容器样式 */
.swiper-container {
  width: 100%;
  overflow: hidden;
}

.swiper-slide {
  text-align: center;
}

.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  background: #ccc;
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: var(--style-color);
}
