/* ─── TOKENS ────────────────────────────────── */
:root {
  --green: #00923f;
  --green-dark: #003e1b;
  --tag-bg: #a4e61b;
  --tag-text: #1a1a1a;
  --card-bg: #f8f6dc;
  --nav-bg: #f0f0f0;
  --text-1: #111;
  --text-2: #555;
  --radius-card: 16px;
  --radius-pill: 50px;
}

/* ─── RESET ─────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}
img {
  display: block;
}

/* ─── SEARCH ────────────────────────────────── */
.search-wrap {
  position: relative;
  margin-bottom: 20px;
}
input.search-input {
  width: 100%;
  padding: 13px 50px 13px 22px;
  border: 1.5px solid #ddd;
  outline: none;
  transition: border-color 0.2s;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--tag-bg);
  font-size: 16px;
  border-radius: 0;
}
input.search-input:focus {
  border-color: var(--green);
  /* background: #fff; */
}
.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nav-bg);
  pointer-events: none;
}

/* ─── NAV TABS ───────────────────────────────── */
.nav-tabs {
  display: flex;
  gap: 4px;
  background: var(--green);
  border-radius: var(--radius-pill);
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 40px;
}
.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: white;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-tab:hover {
  background: var(--green-dark);
}
.nav-tab.active {
  background: #fff;
  color: #000;
}
.nav-tab svg {
  opacity: 0.6;
}
.nav-tab.active svg {
  opacity: 0.8;
}

/* ─── CATEGORY SECTION ───────────────────────── */
.category-section {
  margin-bottom: 52px;
  scroll-margin-top: 20px;
}
.section-title {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

/* ─── GRID ───────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 720px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 460px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── CARD ───────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease;
  box-shadow: 0px 8px 24px 0px #0000003d;
  position: relative;
}
.card-img-wrap {
  position: relative;
  overflow: hidden;
}
.card-img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: 5px;
}
.card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
}
.card-excerpt {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}
.card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
}
.card-link:hover {
  color: var(--green);
}
a.card-link::before {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  left: 0;
  background: transparent;
  opacity: 0;
  height: 100%;
}

/* ─── PAGINATION ──────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
}
button.pg-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f6f6f6;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
}
button.pg-btn:hover {
  background: #e2e2e2;
}
button.pg-btn.active {
  background: var(--green);
  color: #fff;
}

.pg-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f6f6f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: background 0.15s;
}
.pg-arrow:hover:not(:disabled) {
  background: #e2e2e2;
}
.pg-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.pg-arrow svg {
  transform: scale(2.5);
}

/* ─── STATES ──────────────────────────────────── */
.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
}
.skeleton {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.skel-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  height: 340px;
}

/* ─── CARD HOVER ─────────────────────────────── */
.card:hover {
  background: #000;
}
.card:hover .card-img {
  transform: scale(1.08);
}
.card:hover .card-title {
  color: #fff;
}
.card:hover .card-excerpt {
  color: #fff;
}
.card:hover .card-link {
  color: #fff;
}
.card-title,
.card-excerpt {
  transition: color 0.3s ease;
}
.card-link {
  transition: color 0.3s ease;
}
