/* =========================================================
   TRANS-NZOIA AHP - Projects Page Stylesheet
   ========================================================= */

/* ---------------------------------------------------------
   1. PAGE HERO
   --------------------------------------------------------- */
.page-hero {
  position: relative;
  padding-top: var(--navbar-height);
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.03);
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    170deg,
    rgba(10,31,5,0.72) 0%,
    rgba(10,31,5,0.88) 55%,
    rgba(10,31,5,0.97) 100%
  );
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding-top: var(--space-10);
  padding-bottom: 5rem;
}

/* Breadcrumb removed */

/* Hero body */
.page-hero-eyebrow { margin-bottom: var(--space-3); }

.page-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(159,232,112,0.12);
  border: 1px solid rgba(159,232,112,0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem);
  font-weight: var(--weight-extrabold);
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.text-lime { color: var(--lime); }

.page-hero-sub {
  font-size: var(--text-lead);
  color: rgba(238,247,230,0.7);
  line-height: var(--leading-relaxed);
  max-width: 580px;
  margin-bottom: 0;
}

/* Hero stats strip */
.projects-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: var(--space-8);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(159,232,112,0.15);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.phs-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
}

.phs-val {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: var(--weight-extrabold);
  color: var(--lime);
  line-height: 1;
  letter-spacing: -0.02em;
}

.phs-lbl {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.phs-divider {
  width: 1px;
  height: 40px;
  background: rgba(159,232,112,0.18);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   2. PROJECTS MAIN SECTION
   --------------------------------------------------------- */
.projects-coverage-section {
  background: #f3f7f0;
  padding: 5rem 0 4.5rem;
  border-bottom: 1px solid var(--neutral-200);
}

.projects-error {
  margin-bottom: var(--space-5);
}

/* Intro row: title left, button right */
.projects-coverage-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: 2.5rem;
}

.projects-coverage-intro > div {
  max-width: 560px;
}

/* Two-column grid — equal halves */
.projects-coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Both panels share base card style */
.projects-coverage-map,
.projects-coverage-list {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(22,51,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pcv-section-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: var(--primary-800);
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
  box-shadow: 0 2px 4px rgba(39,102,0,0.05);
}

.pcv-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: var(--weight-extrabold);
  color: var(--neutral-900);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 var(--space-2);
}

.pcv-subtitle {
  font-size: 14px;
  color: var(--neutral-500);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 0 var(--space-5);
}

/* Panel label bar inside each panel */
.pcv-panel-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neutral-500);
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}

/* Map fills all remaining space in the panel */
.pcv-map-wrap {
  background: linear-gradient(160deg, #0d2403 0%, #163505 50%, #1e4a07 100%);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem;
  min-height: 320px;
}

.pcv-map-wrap svg {
  width: 100%;
  height: 100%;
  max-height: 420px;
}

.pcv-map-region path {
  fill: rgba(159,232,112,0.06);
  stroke: rgba(159,232,112,0.25);
  stroke-width: 1.5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 2px rgba(159,232,112,0));
}

.pcv-map-region.has-projects path {
  fill: rgba(159,232,112,0.15);
  stroke: rgba(159,232,112,0.4);
}

.pcv-map-region:hover path {
  fill: rgba(159,232,112,0.3);
  stroke: var(--lime);
  filter: drop-shadow(0 0 8px rgba(159,232,112,0.4));
  transform: translateY(-2px);
}

.pcv-map-region text {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: var(--weight-bold);
  fill: var(--white);
  text-anchor: middle;
  pointer-events: none;
}

.pcv-map-region .pcv-map-sub {
  font-size: 11px;
  font-weight: var(--weight-medium);
  fill: var(--lime);
}

/* Right-panel: header + scrollable card list */
.projects-coverage-list {
  display: flex;
  flex-direction: column;
}

.pcv-list-head {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}

.pcv-list-head .pcv-panel-label {
  padding: 0;
  border: none;
  background: none;
  margin-bottom: 4px;
}

.pcv-list-head .pcv-title {
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  margin: 0;
}

.pcv-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--white);
  background: var(--primary-600);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: var(--weight-bold);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(39,102,0,0.15);
}

.pcv-link:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(39,102,0,0.2);
}

.pcv-link i {
  transition: transform 0.2s ease;
}

.pcv-link:hover i {
  transform: translateX(4px);
}

/* Scrollable card list area */
.pcv-constituency-cards {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
}

.pcv-constituency-cards::-webkit-scrollbar {
  width: 4px;
}

.pcv-constituency-cards::-webkit-scrollbar-track {
  background: transparent;
}

.pcv-constituency-cards::-webkit-scrollbar-thumb {
  background: var(--neutral-200);
  border-radius: 4px;
}

/* Each constituency row — vertical flex, not grid */
.pcv-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 0.875rem;
  padding: 14px 16px;
  min-width: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.pcv-card:hover {
  transform: translateY(-2px);
  background: var(--white);
  border-color: var(--primary-300);
  box-shadow: 0 6px 20px rgba(22,51,0,0.08);
}

/* Card top row: name left, stats right */
.pcv-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.pcv-card h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: var(--weight-bold);
  color: var(--neutral-900);
  line-height: 1.3;
  margin: 0;
  flex-shrink: 0;
}

/* Stats row */
.pcv-card-stats {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
}

.pcv-card-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--neutral-500);
}

.pcv-card-stats strong {
  color: var(--primary-700);
  font-weight: var(--weight-extrabold);
  font-size: 13px;
}

/* Ward chips below the name */
.pcv-ward-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pcv-ward-chips span {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-500);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: var(--weight-medium);
}

/* Awaiting badge — only show in .pcv-card-stats, hide the duplicate <p> */
.pcv-card-body .pcv-empty-badge {
  display: none;
}

.pcv-card-stats .pcv-empty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--neutral-500);
  background: var(--neutral-100);
  border: 1px dashed var(--neutral-300);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.pcv-card--empty {
  opacity: 0.7;
}

.pcv-card--empty .pcv-ward-chips span {
  border-style: dashed;
  color: var(--neutral-400);
}

.projects-main {
  background: #f8faf6;
  padding: 3rem 0 5rem;
}

.projects-main.is-loading .projects-grid {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.projects-main.is-loading .projects-results-meta::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--neutral-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: projectsSpin 0.7s linear infinite;
}

/* ---------------------------------------------------------
   3. FILTER BAR  — two-row toolbar
   --------------------------------------------------------- */
.projects-filter-bar {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  margin-top: 0;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

/* Row 1: search + status + constituency */
.pfb-row-primary {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--neutral-100);
  flex-wrap: wrap;
  gap: 12px;
}

/* Row 2: type filters + sort */
.pfb-row-secondary {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 12px;
  background: var(--neutral-50);
  flex-wrap: wrap;
}

/* Divider between filter groups */
.pfb-divider {
  width: 1px;
  height: 22px;
  background: var(--neutral-200);
  flex-shrink: 0;
  margin: 0 4px;
}

.pfb-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 320px;
}

.pfb-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--neutral-400);
  pointer-events: none;
}

.pfb-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--neutral-800);
  background: var(--neutral-50);
  outline: none;
  transition: all 0.2s ease;
}

.pfb-search-input:focus {
  border-color: var(--primary-400);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(39,102,0,0.1);
}

.pfb-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.pfb-label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  margin-right: 2px;
}

.pfb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--neutral-600);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.pfb-chip:hover {
  border-color: var(--primary-300);
  color: var(--primary-800);
  background: var(--primary-50);
}

.pfb-chip.is-active {
  background: var(--primary-700);
  border-color: var(--primary-700);
  color: var(--white);
  box-shadow: 0 3px 8px rgba(39,102,0,0.25);
}

.pfb-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pfb-chip-dot--active  { background: #22c55e; }
.pfb-chip-dot--planning { background: var(--accent-400); }
.pfb-chip.is-active .pfb-chip-dot--active  { background: rgba(255,255,255,0.7); }
.pfb-chip.is-active .pfb-chip-dot--planning { background: rgba(255,255,255,0.7); }

.pfb-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pfb-sort-select {
  height: 32px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--neutral-700);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236b8f58' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pfb-sort-select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(39,102,0,0.1);
}

.pfb-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: var(--weight-semibold);
  color: var(--neutral-500);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
}
.pfb-reset:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fff5f5;
}

/* ---------------------------------------------------------
   Results header
   --------------------------------------------------------- */
.projects-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--neutral-100);
}

.projects-results-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--weight-bold);
  color: var(--neutral-800);
}

.projects-results-meta .results-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-700);
  color: var(--white);
  font-size: 12px;
  font-weight: var(--weight-extrabold);
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-full);
}

/* ---------------------------------------------------------
   4. PROJECTS GRID
   --------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  min-height: 220px;
  transition: opacity var(--transition-fast);
}

/* PROJECT CARD */
.proj-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

.proj-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  border-color: var(--primary-300);
}

/* Card image */
.proj-card-img {
  position: relative;
  height: 200px;
  background: var(--neutral-100);
  overflow: hidden;
  flex-shrink: 0;
}

.proj-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.proj-card:hover .proj-card-img img {
  transform: scale(1.06);
}

/* Image placeholder when no photo */
.proj-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neutral-100) 0%, var(--neutral-200) 100%);
  color: var(--neutral-300);
  font-size: 3rem;
}

/* Status badge on image */
.proj-status-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.proj-status-badge--active {
  background: rgba(34,197,94,0.9);
  color: #fff;
}

.proj-status-badge--planning {
  background: rgba(245,158,11,0.9);
  color: #fff;
}

/* Constituency tag on image */
.proj-con-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(22,51,0,0.75);
  color: var(--lime);
  backdrop-filter: blur(4px);
}

/* Category tag on image */
.proj-category-tag {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.9);
  color: var(--neutral-800);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Card body */
.proj-card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
  min-width: 0;
}

.proj-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.proj-ward {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--neutral-400);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.proj-ward::before {
  content: '·';
  margin-right: var(--space-2);
  color: var(--neutral-300);
}

.proj-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: var(--weight-bold);
  color: var(--neutral-900);
  line-height: 1.35;
  margin: 0;
  min-height: 44px;
  overflow-wrap: anywhere;
}

/* Card stats */
.proj-card-stats {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.proj-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proj-stat-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--weight-extrabold);
  color: var(--primary-700);
  line-height: 1;
  letter-spacing: 0;
}

.proj-stat-lbl {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--weight-medium);
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Progress bar */
.proj-progress {
  height: 5px;
  background: var(--neutral-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.proj-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary-600), var(--lime));
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* Card footer */
.proj-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--neutral-100);
  margin-top: auto;
  min-width: 0;
}

.proj-contractor {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--neutral-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.proj-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--primary-700);
  text-decoration: none;
  white-space: nowrap;
  transition: gap var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.proj-cta:hover {
  color: var(--lime-dark);
  gap: var(--space-3);
}

/* Milestone chip */
.proj-milestone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--neutral-500);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-lg);
  padding: 6px var(--space-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-height: 30px;
}

.proj-milestone i { font-size: 10px; color: var(--primary-400); }

@keyframes projectsSpin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------
   5. EMPTY STATE
   --------------------------------------------------------- */
.projects-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-8);
  text-align: center;
  gap: var(--space-4);
}

.projects-empty-icon {
  font-size: 4rem;
  color: var(--neutral-200);
}

.projects-empty h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--neutral-600);
}

.projects-empty p {
  font-size: 15px;
  color: var(--neutral-400);
}

/* ---------------------------------------------------------
   6. PAGINATION
   --------------------------------------------------------- */
.projects-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-8) 0 var(--space-4);
  flex-wrap: wrap;
}

.ppg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: var(--neutral-600);
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.ppg-btn:hover:not(:disabled) {
  border-color: var(--primary-400);
  color: var(--primary-700);
  background: var(--primary-50);
}

.ppg-btn.is-active {
  background: var(--primary-700);
  border-color: var(--primary-700);
  color: var(--white);
  cursor: default;
}

.ppg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ppg-ellipsis {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--neutral-400);
  padding: 0 var(--space-1);
  line-height: 40px;
}

.ppg-info {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--neutral-400);
  text-align: center;
  padding-bottom: var(--space-2);
  width: 100%;
}

/* ---------------------------------------------------------
   7. CARD ENTER ANIMATION
   --------------------------------------------------------- */
@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.proj-card.is-visible {
  animation: cardFadeUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---------------------------------------------------------
   7. RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-coverage-grid {
    grid-template-columns: 1fr;
  }
  .pcv-map-wrap {
    min-height: 320px;
  }
  .pfb-sort-wrap {
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  .page-hero { min-height: 60vh; }
  .page-hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .projects-hero-stats {
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: var(--space-4);
  }
  .phs-divider { display: none; }
  .phs-item { flex: 1 1 40%; }
  .projects-filter-bar {
    padding: var(--space-4);
    align-items: stretch;
  }
  .pfb-search-wrap,
  .pfb-filters,
  .pfb-sort-wrap {
    width: 100%;
  }
  .pfb-filters {
    align-items: flex-start;
  }
  .pfb-sort-wrap { margin-left: 0; width: 100%; }
  .pfb-sort-select { flex: 1; }
  .projects-grid { grid-template-columns: 1fr; }
  .proj-card-body { padding: var(--space-5); }
  .proj-card-title { min-height: 0; }
  .proj-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .proj-contractor {
    white-space: normal;
  }
  .projects-results-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .projects-coverage-section {
    padding: var(--space-8) 0;
  }
  .projects-coverage-map,
  .projects-coverage-list {
    padding: var(--space-5);
  }
  .pcv-list-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .pcv-card {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .pcv-card-stats {
    justify-content: flex-start;
    max-width: none;
  }
  .pcv-map-wrap {
    min-height: 260px;
    padding: var(--space-3);
  }
  .pcv-map-region text {
    font-size: 11px;
  }
  .pcv-map-region .pcv-map-sub {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .pfb-filters { gap: var(--space-1); }
  .pfb-chip { font-size: 11px; min-height: 28px; padding: 0 var(--space-2); }
  .pcv-card-stats span {
    width: 100%;
    justify-content: space-between;
  }
  .projects-coverage-map,
  .projects-coverage-list,
  .proj-card-body {
    padding: var(--space-4);
  }
}
