/* 济企通 - 核心样式 */
/* 简洁专业，目标用户是求职者 */

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #64748b;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 头部 */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--primary-color);
}

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

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

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

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

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* 搜索框 */
.search-box {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  outline: none;
}

.search-box button {
  padding: 14px 28px;
  background: var(--text-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.search-box button:hover {
  background: #0f172a;
}

/* 统计栏 */
.stats-bar {
  background: var(--card-bg);
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item .number {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-item .label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 企业卡片网格 */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 2px;
}

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

.company-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.company-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.company-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.company-posts {
  font-size: 13px;
  color: var(--text-muted);
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.star {
  color: #fbbf24;
  font-size: 16px;
}

.star.empty {
  color: var(--border-color);
}

.rating-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.card-body {
  margin-bottom: 12px;
}

.business {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.address {
  font-size: 13px;
  color: var(--text-muted);
}

.card-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.overtime-tag {
  display: inline-block;
  padding: 4px 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 12px;
  border-radius: 4px;
  margin-top: 8px;
}

.salary-tag {
  display: inline-block;
  padding: 4px 8px;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 12px;
  border-radius: 4px;
  margin-top: 8px;
  margin-right: 4px;
}

/* 标签 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 4px 10px;
  background: var(--bg-color);
  color: var(--text-secondary);
  font-size: 12px;
  border-radius: 4px;
}

.tag.warning {
  background: #fef3c7;
  color: #92400e;
}

/* 企业详情页 */
.company-detail {
  padding: 40px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

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

.detail-header {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.detail-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 15px;
}

.meta-item .icon {
  font-size: 18px;
}

.detail-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.detail-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {
  padding: 12px;
  background: var(--bg-color);
  border-radius: var(--radius);
}

.info-item .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-item .value {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

/* 点评列表 */
.review-item {
  padding: 16px;
  background: var(--bg-color);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

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

.review-type {
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 500;
}

.review-date {
  font-size: 13px;
  color: var(--text-muted);
}

.review-content {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* 列表页 */
.list-header {
  padding: 40px 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.list-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.list-header p {
  color: var(--text-secondary);
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

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

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 14px;
}

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

/* 投稿入口 */
.contribute-section {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-top: 40px;
}

.contribute-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #92400e;
}

.contribute-section p {
  color: #a16207;
  margin-bottom: 16px;
}

.contribute-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #ea580c;
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s;
}

.contribute-btn:hover {
  background: #c2410c;
}

/* 底部 */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 40px 0;
  margin-top: 60px;
}

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

.footer-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-section p,
.footer-section a {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #334155;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* 响应式 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .nav {
    gap: 16px;
  }

  .hero {
    padding: 40px 0;
  }

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

  .search-box {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .stat-item .number {
    font-size: 22px;
  }

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

  .detail-meta {
    flex-direction: column;
    gap: 12px;
  }

  .detail-header {
    padding: 20px;
  }

  .detail-title {
    font-size: 24px;
  }

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

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.company-card {
  animation: fadeIn 0.3s ease-out;
}
