/*
Theme Name: OCR Pro
Theme URI: https://your-domain.com
Author: Your Company
Author URI: https://your-domain.com
Description: 专业OCR产品介绍网站
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ocr-pro
Domain Path: /languages
*/

:root {
  --primary-color: #0066cc;
  --secondary-color: #f39c12;
  --dark-color: #1a1a1a;
  --light-color: #f5f5f5;
  --gray-color: #666666;
  --border-color: #e0e0e0;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

/* 导航栏 */
.navbar {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.nav-menu a {
  color: var(--dark-color);
  font-weight: 500;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-menu .dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  list-style: none;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: -5px;
}

.nav-menu .dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  margin-top: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 14px 24px;
  color: var(--dark-color);
  transition: all 0.2s ease;
  font-size: 14px;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background: var(--light-color);
  color: var(--primary-color);
  padding-left: 30px;
}

/* 宽版下拉菜单（适合分组展示） - 横向布局 */
.dropdown-mega {
  min-width: 760px;
  max-width: 1000px;
  max-height: 680px; /* 增加高度 */
  overflow-y: auto;
  padding: 16px 12px;
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
  scrollbar-width: thin; /* Firefox滚动条 */
  scrollbar-color: #888 #f1f1f1;
}

.dropdown-mega::-webkit-scrollbar {
  width: 6px;
}

.dropdown-mega::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-mega::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.dropdown-mega::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 每一列（父分类）- 横向排列 */
.dropdown-mega > li.dropdown-group {
  display: block;
  list-style: none;
  flex: 0 0 auto;
  min-width: 180px;
  max-width: 220px;
  margin: 0;
  padding: 0 12px;
}

.dropdown-mega > li.dropdown-group .dropdown-header {
  display: block;
  padding: 8px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 8px;
  white-space: normal;
}

.dropdown-mega > li.dropdown-group .dropdown-sublist {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.dropdown-mega > li.dropdown-group .dropdown-sublist li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dropdown-mega > li.dropdown-group .dropdown-sublist li a {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: var(--dark-color);
  white-space: normal;
  transition: all 0.2s ease;
}

.dropdown-mega > li.dropdown-group .dropdown-sublist li a:hover {
  color: var(--primary-color);
  padding-left: 8px;
  background: transparent;
}

/* 底部全宽的查看全部链接 */
.dropdown-mega > li.dropdown-footer {
  display: block;
  flex: 0 0 100%;
  list-style: none;
  border-top: 1px solid var(--border-color);
  margin-top: 12px;
  padding-top: 8px;
}

.dropdown-mega > li.dropdown-footer a {
  display: block;
  padding: 8px 12px;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
}

.dropdown-mega > li.dropdown-footer a:hover {
  background: var(--light-color);
}

.cta-btn {
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  transition: var(--transition);
}

.cta-btn:hover {
  background: #0052a3;
  color: white;
}

/* 页脚 */
.footer {
  background: var(--dark-color);
  color: #ffffff;
  padding: 50px 20px 20px;
  margin-top: 100px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

/* WordPress菜单风格 */
.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-list > li {
  margin-bottom: 20px;
}

.footer-nav-list > li > a {
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 15px;
}

.footer-nav-list > li > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-list > li > ul > li {
  margin-bottom: 10px;
}

.footer-nav-list > li > ul > li > a {
  color: #cccccc;
  font-weight: normal;
  font-size: 14px;
}

.footer-nav-list > li > ul > li > a:hover {
  color: var(--secondary-color);
}

/* 默认页脚部分样式 */
.footer-section {
  break-inside: avoid;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #cccccc;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-social {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  justify-content: flex-start;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: white;
  font-size: 18px;
  font-weight: bold;
}

.footer-social a:hover {
  background: var(--secondary-color);
  color: white;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: #999999;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
  padding: 100px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 16px;
}

.btn-primary {
  background: var(--secondary-color);
  color: white;
}

.btn-primary:hover {
  background: #e57e0a;
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
}

.btn-secondary:hover {
  background: var(--light-color);
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 20px;
}

.section-title {
  font-size: 36px;
  margin-bottom: 50px;
  text-align: center;
}

/* 卡片 */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.card h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* 响应式 */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 15px;
  }

  .nav-menu {
    gap: 20px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
