/* 自定义CSS样式 - 强制加载版本 1.2 - 优化间距 */

/* 核心样式重置和确保加载 */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif !important;
  color: #3E4C59 !important;
  background-color: white !important;
  overflow-x: hidden !important;
}

/* 自定义颜色类 - 备用方案 */
.bg-primary {
  background-color: #0F52BA !important;
}

.bg-secondary {
  background-color: #36B37E !important;
}

.bg-accent {
  background-color: #FF5630 !important;
}

.text-primary {
  color: #0F52BA !important;
}

.text-secondary {
  color: #36B37E !important;
}

.text-accent {
  color: #FF5630 !important;
}

.text-neutral-100 { color: #F5F7FA !important; }
.text-neutral-200 { color: #E4E7EB !important; }
.text-neutral-300 { color: #CBD2D9 !important; }
.text-neutral-400 { color: #9AA5B1 !important; }
.text-neutral-500 { color: #7B8794 !important; }
.text-neutral-600 { color: #616E7C !important; }
.text-neutral-700 { color: #52606D !important; }
.text-neutral-800 { color: #3E4C59 !important; }
.text-neutral-900 { color: #1F2933 !important; }

.bg-neutral-100 { background-color: #F5F7FA !important; }
.bg-neutral-200 { background-color: #E4E7EB !important; }
.bg-neutral-300 { background-color: #CBD2D9 !important; }
.bg-neutral-400 { background-color: #9AA5B1 !important; }
.bg-neutral-500 { background-color: #7B8794 !important; }
.bg-neutral-600 { background-color: #616E7C !important; }
.bg-neutral-700 { background-color: #52606D !important; }
.bg-neutral-800 { background-color: #3E4C59 !important; }
.bg-neutral-900 { background-color: #1F2933 !important; }

.border-primary {
  border-color: #0F52BA !important;
}

.border-secondary {
  border-color: #36B37E !important;
}

.border-accent {
  border-color: #FF5630 !important;
}

.from-primary {
  --tw-gradient-from: #0F52BA !important;
}

.to-secondary {
  --tw-gradient-to: #36B37E !important;
}

.hover\:text-primary:hover {
  color: #0F52BA !important;
}

.hover\:bg-primary:hover {
  background-color: #0F52BA !important;
}

.font-inter {
  font-family: 'Inter', sans-serif !important;
}

/* 基础工具类 */
.content-auto {
  content-visibility: auto;
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-8px);
}

/* 全局区块边界与层次 */
.section-block {
  border: 1px solid rgba(15, 82, 186, 0.06);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.12);
  border-radius: 24px;
  background: #ffffff;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  .section-block {
    padding: 3rem;
    margin-bottom: 3rem;
  }
}

.section-surface {
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.35);
  border-radius: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 2.5rem 2rem;
}

@media (min-width: 1024px) {
  .section-surface {
    padding: 3.5rem 3rem;
  }
}

.block-title {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.block-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0F52BA, #36B37E);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.section-padding {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.section-padding-large {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .section-padding-large {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.section-padding-xl {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section-padding-xl {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-slide-in {
  animation: slideIn 0.8s ease-out;
}

.carousel-image {
  transition: transform 0.5s ease-in-out;
}

/* 公司简介专用样式 */
.company-intro-bg {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
}

.gradient-text {
  background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #1f2937 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.floating-decoration {
  animation: float 6s ease-in-out infinite;
}

/* 关键帧动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* 响应式设计增强 */
@media (max-width: 768px) {
  .section-padding,
  .section-padding-large,
  .section-padding-xl {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* 自定义颜色变量 */
:root {
  --primary-color: #3b82f6;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
} 

/* 动画样式 */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

.animate-slide-up {
  animation: slide-up 1s ease-out forwards;
}

.animate-fade-in {
  animation: fade-in 0.5s ease-out forwards;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 轮播样式 */
.carousel-slide {
  transition: opacity 1s ease-in-out !important;
}

.carousel-indicator.active {
  background-color: white !important;
}

/* 确保渐变背景正常显示 */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important;
}

.from-white {
  --tw-gradient-from: #ffffff !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;
}

.via-neutral-50\/30 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(248, 250, 252, 0.3), var(--tw-gradient-to, rgba(248, 250, 252, 0)) !important;
}

.to-white {
  --tw-gradient-to: #ffffff !important;
}

/* 图标显示优化 */
.icon-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.stats-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.stats-icon img {
  max-width: 75%;
  max-height: 75%;
  object-fit: contain;
}

/* 导航栏优化样式 */
#navbar {
  backdrop-filter: blur(10px);
}

#navbar nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

#navbar nav a:not(.bg-primary) {
  height: 40px;
}

/* 确保导航栏垂直居中 */
#navbar .flex.items-center {
  min-height: 64px;
}

/* 新闻页面按钮样式 */
.category-filter-btn {
  background-color: white;
  border: 2px solid #E4E7EB;
  color: #616E7C;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.category-filter-btn:hover {
  background-color: #F8FAFC;
  border-color: #0F52BA;
  color: #0F52BA;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px 0 rgba(15, 82, 186, 0.15);
}

.category-filter-btn.active {
  background-color: #0F52BA;
  border-color: #0F52BA;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(15, 82, 186, 0.3);
}

.view-btn {
  color: #7B8794;
  transition: all 0.2s ease;
}

.view-btn:hover {
  color: #0F52BA;
  transform: scale(1.05);
}

.view-btn.active {
  background-color: white;
  color: #0F52BA;
  font-weight: 600;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* 新闻卡片增强边界 */
.news-item {
  border: 1px solid rgba(228, 231, 235, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-item:hover {
  border-color: rgba(15, 82, 186, 0.2);
  transform: translateY(-4px);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .text-4xl {
    font-size: 2rem !important;
  }
  
  .md\:text-6xl {
    font-size: 2.5rem !important;
  }
  
  .text-xl {
    font-size: 1.1rem !important;
  }
  
  .md\:text-2xl {
    font-size: 1.3rem !important;
  }
}

/* 百度地图样式 */
#map-container {
  position: relative;
  z-index: 1;
}

#map-container .BMapGL-container {
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 百度地图信息窗口样式 */
.BMapGL-infoWindow {
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.BMapGL-infoWindow-content {
  border-radius: 0.5rem !important;
}

/* 百度地图控件样式 */
.BMapGL-scaleControl,
.BMapGL-zoomControl {
  border-radius: 0.5rem !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.BMapGL-zoomControl button {
  background-color: white !important;
  color: #0F52BA !important;
  border: 1px solid rgba(228, 231, 235, 0.5) !important;
  font-weight: 600 !important;
}

.BMapGL-zoomControl button:hover {
  background-color: #0F52BA !important;
  color: white !important;
}

/* 响应式地图 */
@media (max-width: 768px) {
  #map-container {
    height: 300px !important;
  }
}

/* 通用卡片阴影与边界 */
.card-elevated {
  background: #fff;
  border: 1.5px solid rgba(15, 82, 186, 0.26);
  border-radius: 18px;
  box-shadow: 0 10px 32px -14px rgba(0, 0, 0, 0.36);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-elevated:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 82, 186, 0.42);
  box-shadow: 0 26px 64px -18px rgba(0, 0, 0, 0.46);
}

/* 发展历程卡片 */
.history-card {
  border: 1.5px solid rgba(15, 82, 186, 0.3);
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 12px 34px -16px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.history-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 82, 186, 0.5);
  box-shadow: 0 22px 60px -18px rgba(0, 0, 0, 0.5);
}

.history-card .year-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(15, 82, 186, 0.08);
  color: #0F52BA;
  font-weight: 600;
  font-size: 13px;
}

/* 公司介绍段落样式 */
#company-intro-description p {
  margin-bottom: 1.5em;
  text-align: left;
}

#company-intro-description p:last-child {
  margin-bottom: 0;
}

#company-intro-description p:first-child {
  margin-top: 0;
}

/* 企业荣誉横向滚动样式 */
.honors-scroll-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 20px 0;
}

.honors-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.honors-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.honors-scroll-track {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  transition: transform 0.3s ease;
}

/* 荣誉卡片 */
.honor-card {
  flex: 0 0 auto;
  width: 280px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid rgba(15, 82, 186, 0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transform-origin: center;
  will-change: transform;
}

/* 横版图片的卡片 - 使用更宽的容器 */
.honor-card.landscape-card {
  flex: 0 0 400px !important;
  width: 400px !important;
  min-width: 400px !important;
  max-width: 400px !important;
  height: fit-content !important;
  padding: 0 !important;
  margin: 0 !important;
  align-self: center !important;
}

/* 横版图片容器 - 限制高度，使用16:9比例 */
.honor-card.landscape-card .honor-image-wrapper {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  width: calc(100% + 4px) !important;
  margin-left: -2px !important;
  margin-right: -2px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

.honor-card.landscape-card .honor-image-wrapper .honor-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  max-height: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.honor-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: rgba(15, 82, 186, 0.3);
  z-index: 10;
  position: relative;
}

/* 图片容器 */
.honor-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f5f5f5;
  display: block;
  box-sizing: border-box;
  /* 容器高度完全由图片内容决定，不设置任何固定高度 */
}

/* 横版图片容器 - 根据图片自适应 */
.honor-image-wrapper:not(.portrait) {
  /* 横版图片：容器高度完全由图片决定，不设置任何固定高度 */
  height: auto;
  min-height: auto;
}

.honor-image-wrapper:not(.portrait) .honor-image {
  width: 100%;
  height: auto;
  /* 移除max-height限制，让横版图片根据宽度自然显示 */
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* 竖版图片容器 - 根据图片自适应 */
.honor-image-wrapper.portrait {
  height: auto;
}

.honor-image-wrapper.portrait .honor-image {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.honor-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  vertical-align: top;
}

.honor-card:hover .honor-image-wrapper:not(.portrait) .honor-image {
  transform: scale(1.1);
}

.honor-card:hover .honor-image-wrapper.portrait .honor-image {
  transform: scale(1.05);
}

/* 悬停遮罩 */
.honor-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.honor-card:hover .honor-overlay {
  opacity: 1;
}

.honor-zoom-btn {
  background: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #0F52BA;
  font-size: 20px;
  cursor: pointer;
  transform: scale(0.8);
  transition: transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.honor-card:hover .honor-zoom-btn {
  transform: scale(1);
}

/* 信息区域 */
.honor-info {
  padding: 20px;
}

.honor-year {
  display: inline-block;
  background: linear-gradient(135deg, #0F52BA, #36B37E);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.honor-title {
  font-size: 16px;
  font-weight: 700;
  color: #1F2933;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.honor-description {
  font-size: 13px;
  color: #616E7C;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 渐变遮罩 */
.honors-gradient-left,
.honors-gradient-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}

.honors-gradient-left {
  left: 0;
  background: linear-gradient(to right, #F5F7FA, transparent);
}

.honors-gradient-right {
  right: 0;
  background: linear-gradient(to left, #F5F7FA, transparent);
}

/* 控制按钮 */
.honors-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: 2px solid #E4E7EB;
  color: #0F52BA;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.honors-scroll-btn:hover {
  background: #0F52BA;
  color: white;
  border-color: #0F52BA;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 16px rgba(15, 82, 186, 0.3);
  z-index: 10;
}

.honors-scroll-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.honors-scroll-prev {
  left: 10px;
}

.honors-scroll-next {
  right: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
  .honor-card {
    width: 240px;
  }
  
  .honor-card.landscape-card {
    flex: 0 0 320px !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
  }
  
  .honor-card.landscape-card .honor-image-wrapper {
    width: calc(100% + 4px) !important;
    margin-left: -2px !important;
    margin-right: -2px !important;
  }
  
  .honor-image-wrapper {
    min-height: auto;
  }
  
  .honor-image-wrapper:not(.portrait) {
    min-height: auto;
  }
  
  .honor-image-wrapper:not(.portrait) .honor-image {
    max-height: none;
  }
  
  .honor-image-wrapper.portrait .honor-image {
    max-height: 500px;
  }
  
  .honors-scroll-track {
    gap: 16px;
    padding: 0 10px;
  }
  
  .honors-gradient-left,
  .honors-gradient-right {
    width: 40px;
  }
  
  .honors-scroll-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .honors-scroll-prev {
    left: 5px;
  }
  
  .honors-scroll-next {
    right: 5px;
  }
}

/* 图片放大模态框 */
.honor-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.honor-lightbox.active {
  display: flex;
}

.honor-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.honor-lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  object-fit: contain;
}

.honor-lightbox-info {
  padding: 20px;
  background: white;
}

.honor-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  color: #1F2933;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.honor-lightbox-close:hover {
  background: #f5f5f5;
  transform: scale(1.1);
}
