/* =========================
FILE: histories.css
========================= */

body {
  background: #F7FAF7;
}

/* HERO */

.histories-hero {
  position: relative;
  padding: 190px 40px 110px;
  text-align: center;
  max-width: 1280px;
  margin: auto;
}

.hero-badge {
  display: inline-flex;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(20,83,45,0.10);
  color: #14532D;
  font-weight: 800;
  margin-bottom: 30px;
}

.histories-hero h1 {
  font-size: 74px;
  line-height: 1.05;
  font-weight: 900;
  color: #1F2937;
  margin-bottom: 24px;
}

.histories-hero p {
  max-width: 840px;
  margin: auto;
  line-height: 1.9;
  color: #4B5563;
  font-size: 20px;
}

/* FILTERS */

.filters-section {
  max-width: 1400px;
  margin: auto;
  padding: 0 40px 70px;
}

.search-box {
  background: rgba(255,255,255,0.92);
  border-radius: 28px;
  padding: 20px 24px;
  display: flex;
  gap: 18px;
  margin-bottom: 34px;
  box-shadow: 0 8px 24px rgba(20,83,45,0.05);
}

.search-box i {
  color: #14532D;
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 17px;
  color: #1F2937;
}

.filter-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  border: none;
  padding: 14px 24px;
  border-radius: 16px;
  cursor: pointer;
  background: white;
  font-weight: 700;
  color: #14532D;
  transition: 0.3s ease;
}

.filter-btn:hover {
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(
    135deg,
    #14532D,
    #166534
  );
  color: white;
}

/* GRID */

.histories-container {
  max-width: 1400px;
  margin: auto;
  padding: 0 40px 120px;
}

.histories-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
}

/* CARD */

.history-card {
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  border-radius: 34px;
  transition: 0.4s ease;
  box-shadow: 0 10px 30px rgba(20,83,45,0.06);
}

.history-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 40px rgba(20,83,45,0.10);
}

.history-image {
  height: 240px;
  background-size: cover;
  background-position: center;
}

.history-content {
  padding: 32px;
}

.history-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.meta-pill {
  background: rgba(20,83,45,0.08);
  color: #14532D;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.read-pill {
  background: rgba(20,83,45,0.08);
  color: #14532D;
}

.history-content h3 {
  font-size: 30px;
  margin-bottom: 18px;
  color: #1F2937;
}

.history-content p {
  color: #4B5563;
  line-height: 1.9;
}

.history-link {
  margin-top: 24px;
  display: inline-flex;
  gap: 10px;
  font-weight: 800;
  color: #14532D;
}

/* PAGINATION */

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 60px;
}

.page-btn {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: white;
  color: #14532D;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease;
}

.page-btn:hover {
  transform: translateY(-3px);
}

.page-btn.active {
  background: linear-gradient(
    135deg,
    #14532D,
    #166534
  );
  color: white;
}

/* STATES */

.loading-state,
.error-state,
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.loading-state h3,
.error-state h3,
.no-results h3 {
  color: #1F2937;
  margin-bottom: 12px;
}

.loading-state p,
.error-state p,
.no-results p {
  color: #4B5563;
}

/* RESPONSIVE */

@media (max-width: 1100px) {

  .histories-hero {
    padding: 170px 40px 90px;
  }

  .histories-hero h1 {
    font-size: 56px;
  }

  .filters-section,
  .histories-container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 700px) {

  .histories-hero {
    padding: 150px 24px 80px;
  }

  .histories-hero h1 {
    font-size: 40px;
  }

  .histories-hero p {
    font-size: 18px;
  }

  .filters-section,
  .histories-container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .histories-grid {
    grid-template-columns: 1fr;
  }

  .history-content {
    padding: 24px;
  }

  .history-content h3 {
    font-size: 24px;
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    width: 100%;
  }
}