/* 生态探险游 - 海洋生态探险主题样式 */
/* 主色调: 海洋蓝 #1565c0, 珊瑚橙 #ff7043, 深海蓝 #0d47a1 */

/* CSS 变量定义 */
:root {
  --primary-color: #1565c0;
  --secondary-color: #ff7043;
  --dark-color: #0d47a1;
  --light-color: #e3f2fd;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #fff;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 70px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--dark-color);
}

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

ul {
  list-style: none;
}

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部 */
.header {
  background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
  color: #fff;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  border-bottom-color: var(--secondary-color);
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 6px 16px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  width: 150px;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.7);
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 50%, #0277bd 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--secondary-color);
  color: #fff;
}

.btn-primary:hover {
  background: #f4511e;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-secondary:hover {
  background: #fff;
  color: var(--primary-color);
}

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

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

/* 区块标题 */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text-light);
}

/* 分类卡片 */
.categories {
  padding: 60px 0;
  background: var(--bg-light);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.category-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

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

.category-icon {
  width: 80px;
  height: 80px;
  background: var(--light-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}

.category-card h3 {
  color: var(--dark-color);
  margin-bottom: 10px;
}

.category-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* 特色内容 */
.featured {
  padding: 60px 0;
}

.featured-card {
  background: linear-gradient(135deg, var(--light-color) 0%, #fff 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  border-left: 5px solid var(--secondary-color);
  box-shadow: var(--shadow);
}

.featured-card h3 {
  color: var(--dark-color);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.featured-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.featured-card p {
  color: var(--text-light);
  margin-bottom: 20px;
}

/* 内容列表 */
.content-list {
  padding: 60px 0;
  background: var(--bg-light);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.content-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.content-card:hover {
  box-shadow: var(--shadow-hover);
}

.content-image {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
}

.content-body {
  padding: 20px;
}

.content-body h4 {
  color: var(--dark-color);
  margin-bottom: 10px;
}

.content-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.content-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 三栏文章区 */
.articles-section {
  padding: 60px 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.article-column h3 {
  color: var(--dark-color);
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.article-item {
  padding: 15px;
  background: var(--bg-light);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.article-item:hover {
  background: var(--light-color);
}

.article-item a {
  color: var(--text-color);
  font-weight: 500;
  display: block;
  margin-bottom: 5px;
}

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

.article-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 面包屑 */
.breadcrumb {
  background: var(--bg-light);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-light);
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

/* 分类页面 */
.category-header {
  background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.category-header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.category-header p {
  opacity: 0.9;
}

.policy-list {
  padding: 40px 0;
}

.policy-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
}

.policy-item:hover {
  box-shadow: var(--shadow-hover);
}

.policy-item h3 {
  color: var(--dark-color);
  margin-bottom: 10px;
}

.policy-meta {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.policy-item p {
  color: var(--text-light);
  margin-bottom: 15px;
}

/* 文章页面 */
.article-header {
  background: var(--bg-light);
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 15px;
}

.article-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-content {
  padding: 40px 0;
}

.article-main {
  max-width: 800px;
  margin: 0 auto;
}

.toc {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 30px;
}

.toc h3 {
  color: var(--dark-color);
  margin-bottom: 15px;
}

.toc ul {
  list-style: disc;
  padding-left: 20px;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  color: var(--text-light);
}

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

.article-section {
  margin-bottom: 40px;
}

.article-section h2 {
  color: var(--dark-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-color);
}

.article-section p {
  margin-bottom: 15px;
  color: var(--text-color);
  line-height: 1.8;
}

.download-options {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

/* 404页面 */
.error-page {
  min-height: calc(100vh - var(--header-height) - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-content h1 {
  font-size: 8rem;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 20px;
}

.error-content h2 {
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 20px;
}

.error-content p {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* 页脚 */
.footer {
  background: var(--dark-color);
  color: #fff;
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.footer-brand p {
  opacity: 0.8;
  line-height: 1.8;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column a {
  color: rgba(255,255,255,0.8);
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .article-meta {
    flex-wrap: wrap;
  }

  .download-options {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .category-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    padding: 25px;
  }

  .error-content h1 {
    font-size: 5rem;
  }
}
