/* ========================================
   ZanCms 仿站样式 - 完全本地化版本
   ======================================== */

/* CSS Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #64748b;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 45px;
  width: auto;
}

@media (max-width: 768px) {
  .logo-img {
    height: 32px;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

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

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 100%;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary.btn-large {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: transparent;
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 16px;
}

.hero-image {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: auto;
}

/* ========================================
   Section Common
   ======================================== */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 48px;
}

/* ========================================
   Features Section
   ======================================== */
.features {
  background: var(--bg-white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-light);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ========================================
   Templates Section
   ======================================== */
.templates {
  background: var(--bg-light);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.template-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.template-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.template-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.template-card:hover .template-image img {
  transform: scale(1.05);
}

.template-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.template-overlay .btn-primary {
  transform: translateY(20px);
  transition: var(--transition);
}

.template-card:hover .template-overlay .btn-primary {
  transform: translateY(0);
}

.template-info {
  padding: 20px;
}

.template-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f1f5f9;
  color: var(--text-light);
  font-size: 12px;
  border-radius: 4px;
}

.tag img {
  width: 14px;
  height: 14px;
}

/* ========================================
   Help Section
   ======================================== */
.help-section {
  background: var(--bg-white);
}

.help-header {
  margin-bottom: 32px;
}

.help-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.help-item {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.help-item:hover {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
}

.help-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.help-item h4 a {
  color: var(--text-dark);
}

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

.help-date {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
  display: block;
}

.help-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   Tutorial Section
   ======================================== */
.tutorial-section {
  background: var(--bg-light);
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.tutorial-header .section-title {
  margin-bottom: 0;
}

.more-link {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 500;
}

.more-link:hover {
  text-decoration: underline;
}

.tutorial-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tutorial-item {
  background: var(--bg-white);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.tutorial-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.tutorial-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tutorial-item h4 a {
  color: var(--text-dark);
}

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

.tutorial-date {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
  display: block;
}

.tutorial-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   News Section
   ======================================== */
.news-section {
  background: var(--bg-white);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.news-card:hover {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.news-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.news-card h4 a {
  color: var(--text-dark);
}

.news-card h4 a:hover {
  color: var(--primary-color);
}

.news-date {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
  display: block;
}

.news-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--text-dark);
  color: #fff;
  padding: 60px 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 80px;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-btns {
    justify-content: center;
  }

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

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

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

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

  .footer-content {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 20px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-btns {
    flex-direction: column;
    gap: 12px;
  }

  .btn-primary.btn-large,
  .btn-outline.btn-large {
    padding: 12px 24px;
    font-size: 15px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 26px;
  }

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

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

  .help-list {
    grid-template-columns: 1fr;
  }

  .tutorial-list {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }
}

/* ========================================
   Article List - Left Thumb Style
   ======================================== */
.article-list-thumb {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-item-thumb {
  display: flex;
  gap: 24px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.article-item-thumb:hover {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-thumb-img {
  flex-shrink: 0;
  width: 220px;
  height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.article-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.article-item-thumb:hover .article-thumb-img img {
  transform: scale(1.05);
}

.article-thumb-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.article-thumb-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-thumb-title a {
  color: var(--text-dark);
}

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

.article-thumb-date {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.article-thumb-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .article-item-thumb {
    flex-direction: column;
  }
  .article-thumb-img {
    width: 100%;
    height: 180px;
  }
}

/* ========================================
   Animation
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ========================================
   Scroll to top button (hidden by default)
   ======================================== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

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

/* Page Content Width - 文章/单页/列表内容区 */
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Swiper */
.hero-swiper {
  position: relative;
  overflow: hidden;
}
.hero-swiper .swiper-wrapper {
  position: relative;
  width: 100%;
}
.hero-swiper .swiper-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-swiper .swiper-slide:first-child {
  position: relative;
  opacity: 1;
}
.hero-swiper .swiper-slide.active {
  opacity: 1;
}
.hero-swiper .swiper-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero-swiper .swiper-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}
.hero-swiper .swiper-dots span.active {
  background: #fff;
}

/* Feature Image */
.feature-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}
.feature-emoji {
  font-size: 40px;
  display: block;
}

/* Section More Button */
.section-more {
  text-align: center;
  margin-top: 48px;
}

/* Section More Button - Ellipse style */
.section-more .btn-outline {
  border-radius: 50px;
  background: #64748b;
  color: #fff;
  border: none;
  padding: 12px 36px;
  font-size: 15px;
}
.section-more .btn-outline:hover {
  background: #4b5563;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100,116,139,0.4);
}


/* ---- 分页 ---- */
.pagination {
  text-align: center;
  margin-bottom: 48px;
}
.pagination ul {
  display: inline-flex;
  list-style: none;
  gap: 4px;
  padding: 0;
  margin: 0;
}
.pagination li {
  display: inline-block;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font-size: 14px;
  color: var(--text-light);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}
.pagination a:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.pagination li.active a,
.pagination .current {
  color: var(--primary-color);
  background: var(--bg-white);
  border-color: var(--primary-color);
}


/* ---- 移动端菜单 ---- */
.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  position: relative;
  z-index: 1001;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

/* 展开时变X */
.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before {
  top: 0;
  transform: rotate(45deg);
  background: var(--text-dark);
}
.menu-toggle.active span::after {
  top: 0;
  transform: rotate(-45deg);
  background: var(--text-dark);
}

/* 下拉菜单 */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 999;
  padding: 12px 0;
}
.mobile-nav.open {
  display: block;
}
.mobile-nav .mobile-nav-link {
  display: block;
  padding: 14px 24px;
  font-size: 16px;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}
.mobile-nav .mobile-nav-link:last-child {
  border-bottom: none;
}
.mobile-nav .mobile-nav-link:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
}
