/* ai.29038554.xyz 前端样式表 */
/* 统一管理颜色/字体/CSS变量 */

/* Google Fonts 引入 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* ========== CSS 变量 ========== */
:root {
  /* 主色调：海洋蓝 */
  --primary: #0B5B84;
  --primary-light: #1A7FA8;
  --primary-dark: #063952;
  
  /* 辅助色：金色/沙色 */
  --accent: #C9A96E;
  --accent-light: #E8D5A3;
  
  /* 中性色 */
  --white: #FFFFFF;
  --off-white: #F8FAFB;
  --light-gray: #EEF2F5;
  --mid-gray: #9BA8AB;
  --dark-gray: #4A5568;
  --dark: #1A202C;
  
  /* 渐变 */
  --gradient-ocean: linear-gradient(135deg, #0B5B84 0%, #1A7FA8 50%, #C9A96E 100%);
  --gradient-hero: linear-gradient(160deg, rgba(11,91,132,0.95) 0%, rgba(6,57,82,0.85) 100%);
  
  /* 字体 */
  --font-cn: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(11,91,132,0.08);
  --shadow-md: 0 4px 20px rgba(11,91,132,0.12);
  --shadow-lg: 0 8px 40px rgba(11,91,132,0.16);
  
  /* 过渡 */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ========== 基础重置 ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-cn);
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========== 工具类 ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.text-center { text-align: center; }
.text-gradient { 
  background: var(--gradient-ocean); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 懒加载图片 */
.lazy-img {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.lazy-img.loaded {
  opacity: 1;
}

/* ========== 头部导航 ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

/* 导航 */
.nav-menu {
  display: flex;
  gap: var(--space-lg);
}

.nav-item a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark-gray);
  padding: var(--space-xs) 0;
  position: relative;
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-item a:hover::after,
.nav-item a.active::after {
  width: 100%;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--primary);
}

/* 汉堡菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

/* 移动端导航 */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ========== Hero 区域 ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

/* 海洋波浪动画 */
.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,192L48,176C96,160,192,128,288,138.7C384,149,480,203,576,208C672,213,768,171,864,165.3C960,160,1056,192,1152,186.7C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") repeat-x;
  animation: wave 12s linear infinite;
}

@keyframes wave {
  0% { background-position-x: 0; }
  100% { background-position-x: 1440px; }
}

.hero-content {
  text-align: center;
  color: var(--white);
  padding: var(--space-lg);
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.hero-cta {
  display: inline-flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: var(--accent-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
}

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

/* 向下滚动指示 */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 32px;
  height: 32px;
  stroke: var(--white);
  opacity: 0.7;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ========== 内容卡片 ========== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: var(--space-lg);
}

.card-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--light-gray);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.card-title:hover {
  color: var(--primary);
}

.card-text {
  color: var(--dark-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--light-gray);
  font-size: 0.85rem;
  color: var(--mid-gray);
}

.card-more {
  color: var(--primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-more:hover {
  gap: 8px;
}

/* ========== 网格布局 ========== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

@media (max-width: 768px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ========== 页面标题区 ========== */
.page-header {
  padding: calc(72px + var(--space-2xl)) 0 var(--space-2xl);
  background: var(--gradient-hero);
  color: var(--white);
  text-align: center;
}

.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.page-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  font-weight: 300;
}

/* ========== 关于页面 ========== */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.about-img img {
  width: 100%;
  height: auto;
  transition: var(--transition);
}

.about-img:hover img {
  transform: scale(1.03);
}

.about-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.about-content p {
  color: var(--dark-gray);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .about-section {
    grid-template-columns: 1fr;
  }
}

/* ========== 联系页面 ========== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}

.contact-info {
  padding: var(--space-xl);
  background: var(--primary);
  border-radius: var(--radius-xl);
  color: var(--white);
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.contact-item {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.contact-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  opacity: 0.8;
}

.contact-item p {
  opacity: 0.9;
  font-size: 0.95rem;
}

.contact-form {
  padding: var(--space-xl);
  background: var(--off-white);
  border-radius: var(--radius-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11,91,132,0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ========== 页脚 ========== */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand p {
  color: var(--mid-gray);
  margin-top: var(--space-sm);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: var(--space-md);
  color: var(--accent);
}

.footer-links ul li {
  margin-bottom: var(--space-xs);
}

.footer-links ul li a {
  color: var(--mid-gray);
  font-size: 0.9rem;
}

.footer-links ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: var(--mid-gray);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ========== 加载状态 ========== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--mid-gray);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state p {
  font-size: 1.1rem;
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
}

.pagination-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--dark-gray);
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--light-gray);
}

.pagination-btn:hover,
.pagination-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ========== 返回顶部 ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

/* ========== 详情页 ========== */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.article-content h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: var(--space-md);
  color: var(--mid-gray);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--light-gray);
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--dark-gray);
}

.article-body p {
  margin-bottom: var(--space-md);
}

.article-body img {
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
  padding: var(--space-md) 0;
  font-size: 0.9rem;
  color: var(--mid-gray);
}

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

.breadcrumb span {
  margin: 0 var(--space-xs);
}

/* ========== 动画 ========== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 延迟加载动画 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ========== 画廊页面 ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--light-gray);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,91,132,0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
}

/* 灯箱弹窗 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: var(--white);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-caption {
  color: var(--white);
  margin-top: var(--space-md);
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  .gallery-overlay {
    opacity: 1;
  }
}