/* Category Page Styles */

.category-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Category Header */
.category-header {
  padding: 60px 0 40px;
  border-bottom: 3px solid #063f18;
  margin-bottom: 50px;
}

.category-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.category-title {
  font-size: 3em;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.category-search {
  position: relative;
  display: flex;
  align-items: center;
}

.category-search-input {
  padding: 10px 40px 10px 15px;
  border: 1px solid #d0d0d0;
  border-radius: 25px;
  font-size: 14px;
  width: 250px;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-search-input:focus {
  outline: none;
  border-color: #063f18;
  box-shadow: 0 0 0 2px rgba(6, 63, 24, 0.1);
}

.category-search-icon {
  position: absolute;
  right: 12px;
  width: 18px;
  height: 18px;
  color: #666;
  pointer-events: none;
}

/* Category Hero Post */
.category-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-hero-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 8px;
}

.category-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-hero-image a:hover img {
  transform: scale(1.05);
}

.category-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-block;
  background: #063f18;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  width: fit-content;
}

.category-hero-title {
  font-size: 2.2em;
  font-weight: bold;
  margin: 0 0 20px 0;
  line-height: 1.2;
}

.category-hero-title a {
  color: #333;
  text-decoration: none;
}

.category-hero-title a:hover {
  text-decoration: underline;
}

.category-hero-excerpt {
  font-size: 1.1em;
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

.read-more-btn {
  display: inline-block;
  background: #063f18;
  color: white;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  width: fit-content;
  margin-top: 15px;
  transition: background 0.2s ease;
}

.read-more-btn:hover {
  background: #0a5c25;
}

/* Category Divider */
.category-divider {
  margin: 50px 0 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.category-divider h3 {
  font-size: 1.8em;
  color: #333;
  margin: 0;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.category-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-card:hover .category-card-image img {
  transform: scale(1.1);
}

.category-card-content {
  padding: 20px;
}

.category-card-title {
  font-size: 1.3em;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.category-card-title a {
  color: #333;
  text-decoration: none;
}

.category-card-title a:hover {
  text-decoration: underline;
}

.category-card-excerpt {
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
  font-size: 0.95em;
}

.category-card-label {
  display: inline-block;
  background: #063f18;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* No Posts Message */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
  .category-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .category-title {
    font-size: 2em;
  }

  .category-search-input {
    width: 100%;
    max-width: 300px;
  }

  .category-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .category-hero-image {
    height: 250px;
  }

  .category-hero-title {
    font-size: 1.6em;
  }

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

/* Dark Mode for Category Pages */
[data-theme="dark"] .category-header {
  border-bottom-color: #2ecc71;
}

[data-theme="dark"] .category-title {
  color: #e0e0e0;
}

[data-theme="dark"] .category-stats {
  color: #888888;
}

[data-theme="dark"] .category-hero {
  background: #1e1e1e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

[data-theme="dark"] .hero-badge {
  background: #2ecc71;
}

[data-theme="dark"] .category-hero-title a {
  color: #e0e0e0;
}

[data-theme="dark"] .category-hero-excerpt {
  color: #b0b0b0;
}

[data-theme="dark"] .read-more-btn {
  background: #2ecc71;
}

[data-theme="dark"] .read-more-btn:hover {
  background: #27ae60;
}

[data-theme="dark"] .category-divider {
  border-bottom-color: #333333;
}

[data-theme="dark"] .category-divider h3 {
  color: #e0e0e0;
}

[data-theme="dark"] .category-card {
  background: #1e1e1e;
  border-color: #333333;
}

[data-theme="dark"] .category-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"] .category-card-title a {
  color: #e0e0e0;
}

[data-theme="dark"] .category-card-excerpt {
  color: #b0b0b0;
}

[data-theme="dark"] .no-posts {
  color: #888888;
}

[data-theme="dark"] .category-search-input {
  background: #1e1e1e;
  border-color: #333333;
  color: #e0e0e0;
}

[data-theme="dark"] .category-search-input:focus {
  border-color: #2ecc71;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

[data-theme="dark"] .category-search-input::placeholder {
  color: #888888;
}

[data-theme="dark"] .category-search-icon {
  color: #888888;
}

[data-theme="dark"] .category-card-label {
  background: #2ecc71;
  color: #1a1a1a;
}
