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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* 头部导航栏样式 */
.main-header {
  background-color: #2c2c2c;
  color: white;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-title {
  font-size: 28px;
  font-weight: bold;
  color: white;
  margin: 0;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #4CAF50;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: #404040;
  border-radius: 20px;
  padding: 8px 15px;
}

.search-box input {
  background: none;
  border: none;
  color: white;
  outline: none;
  width: 200px;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #ccc;
}

.search-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
}

.auth-links {
  display: flex;
  gap: 15px;
}

.login-link, .register-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.login-link:hover, .register-link:hover {
  color: #4CAF50;
}

/* 二级导航栏样式 */
.secondary-nav {
  background-color: #2c2c2c;
  padding: 15px 0;
  border-top: 1px solid #404040;
}

.secondary-nav .nav-links {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  padding: 0 20px;
  margin-bottom: 15px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #4CAF50;
}

.warning-buttons {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 15px;
  padding: 0 20px;
}

.warning-btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.warning-btn:hover {
  background-color: #45a049;
}

/* 主要内容区域 */
.main-content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px;
}

/* 信息横幅样式 */
.info-banner {
  background-color: #4CAF50;
  color: white;
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-icon {
  font-size: 18px;
}

.banner-text {
  font-size: 16px;
  font-weight: 500;
}

/* 避雷信息警告框样式 */
.warning-box {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px 20px;
  margin-bottom: 30px;
}

.warning-content {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.warning-icon {
  font-size: 20px;
  color: #ff6b6b;
  margin-top: 2px;
}

.warning-text strong {
  color: #333;
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
}

.warning-text p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

/* 筛选区域样式 */
.filter-section {
  background-color: white;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 10px;
  color: #333;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-option {
  background-color: #f5f5f5;
  color: #666;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid #e0e0e0;
}

.filter-option:hover {
  background-color: #e0e0e0;
}

.filter-option.active {
  background-color: #2196F3;
  color: white;
  border-color: #2196F3;
}

/* 内容卡片网格样式 */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.content-card {
  cursor: pointer;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: row;
  height: 200px;
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-content {
  padding: 15px;
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-date {
  font-size: 12px;
  color: #999;
}

.card-rating {
  font-size: 12px;
  color: #ff9800;
  font-weight: 500;
}

.card-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
}

.location-text {
  color: #4CAF50;
  font-weight: 500;
}

.location-icon {
  font-size: 12px;
}


.card-image {
  flex: 0 0 40%;
  height: 200px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 页面底部样式 */
footer {
  background-color: #2c2c2c;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

footer p {
  font-size: 14px;
  color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .logo-section {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .main-nav ul {
    justify-content: center;
  }
  
  .search-box input {
    width: 150px;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .content-card {
    height: auto;
    flex-direction: row;
    margin-bottom: 0;
  }
  
  .card-content {
    padding: 12px;
    flex: 1;
    justify-content: flex-start;
  }
  
  .card-description {
    flex: none;
    -webkit-line-clamp: 3;
    margin-bottom: 8px;
    line-height: 1.4;
  }
  
  .card-location {
    margin-top: 0;
  }
  
  .card-image {
    width: 35%;
    flex: 0 0 35%;
    height: auto;
    min-height: 120px;
  }
  
  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .filter-options {
    justify-content: center;
  }
  
  .secondary-nav .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .warning-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 10px;
  }
  
  .filter-section {
    padding: 12px;
  }
  
  .content-grid {
    gap: 12px;
  }
  
  .content-card {
    margin-bottom: 0;
  }
  
  .card-content {
    padding: 10px;
    flex: 1;
  }
  
  .card-title {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.3;
  }
  
  .card-meta {
    margin-bottom: 6px;
  }
  
  .card-description {
    flex: none;
    -webkit-line-clamp: 2;
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.3;
  }
  
  .card-image {
    width: 35%;
    flex: 0 0 35%;
    height: auto;
    min-height: 100px;
  }
  
  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
