/* 谷伦克建筑工程官网 - 通用样式 */


/* 引入TailwindCSS */
@import url('https://cdn.bootcdn.net/ajax/libs/tailwindcss/2.2.19/tailwind.min.css');

/* 自定义CSS变量 */
:root {
  --primary-blue: #1e40af;
  --secondary-blue: #3b82f6;
  --accent-gray: #6b7280;
  --light-gray: #f3f4f6;
  --dark-gray: #374151;
  --pure-white: #ffffff;
  --text-dark: #1f2937;
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--pure-white);
}

/* 容器样式 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* 导航栏样式 */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-blue);
  padding: 0.75rem 2rem;
  border: 2px solid var(--primary-blue);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: white;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 图片样式 */
.img-responsive {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.img-gallery {
  cursor: pointer;
  transition: all 0.3s ease;
}

.img-gallery:hover {
  transform: scale(1.05);
}

/* 大图查看器样式 */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(30, 64, 175, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-blue);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 渐入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 移动端菜单样式 */
#mobile-menu {
  transition: all 0.3s ease;
}

#mobile-menu.active {
  display: block !important;
}

#mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* 懒加载图片样式 */
.loading {
  filter: blur(2px);
  transition: filter 0.3s ease;
}

.loading:not([data-src]) {
  filter: none;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-gray);
}

/* 文字选择样式 */
::selection {
  background: var(--secondary-blue);
  color: white;
}