
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg-deep:   #08121a;
  --bg-mid:    #0d1f2d;
  --bg-card:   rgba(255,255,255,0.05);
  --accent:    #00e5c0;
  --accent-dim:rgba(0,229,192,0.15);
  --water:     #0090ff;
  --water-dim: rgba(0,144,255,0.15);
  --water-glow:0 0 36px rgba(0,144,255,0.2);
  --gas:       #f59e0b;
  --gas-dim:   rgba(245,158,11,0.15);
  --gas-glow:  0 0 36px rgba(245,158,11,0.2);
  --text-main: #e8f0f5;
  --text-muted:rgba(232,240,245,0.6);
  --border:    rgba(255,255,255,0.1);
}

html { scroll-behavior:smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: "Vazirmatn", sans-serif;
  overflow-x: hidden;
  line-height: 1.7;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(8,18,26,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.nav-logo span { color: var(--text-main); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-home-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 50px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.nav-home-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 150px 40px 80px;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}

.header-left .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--border); }

.page-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.page-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 350px;
}

.header-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-card);
  white-space: nowrap;
}

.stat-chip .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stat-chip.water .dot { background: var(--water); box-shadow: 0 0 8px var(--water); }
.stat-chip.gas   .dot { background: var(--gas);   box-shadow: 0 0 8px var(--gas); }
.stat-chip.all   .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ── FILTER BAR ── */
.filter-bar {
  position: sticky;
  top: 65px;
  z-index: 80;
  background: rgba(8,18,26,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.filter-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Vazirmatn", sans-serif;
  transition: all 0.22s;
  position: relative;
  overflow: hidden;
}
.filter-btn:hover { border-color: rgba(255,255,255,0.25); color: var(--text-main); }

.filter-btn.active-all   { border-color: var(--accent);  color: var(--accent);  background: var(--accent-dim); }
.filter-btn.active-water { border-color: var(--water);   color: var(--water);   background: var(--water-dim); }
.filter-btn.active-gas   { border-color: var(--gas);     color: var(--gas);     background: var(--gas-dim); }

.filter-btn .icon {
  font-size: 1rem;
}

.filter-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 4px;
}

/* search */
.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  margin-right: auto;
  transition: border-color 0.2s;
}
.filter-search:focus-within { border-color: rgba(255,255,255,0.25); }
.filter-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: "Vazirmatn", sans-serif;
  width: 200px;
}
.filter-search input::placeholder { color: var(--text-muted); }

/* view toggle */
.view-toggle {
  display: flex;
  gap: 4px;
}
.view-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.view-btn.active, .view-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── RESULTS BAR ── */
.results-bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── CATEGORY DIVIDER ── */
.category-section { max-width: 1240px; margin: 0 auto; padding: 48px 40px 0; }
.category-section:first-of-type { padding-top: 36px; }

.cat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.cat-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-water { background: var(--water); box-shadow: 0 0 14px rgba(0,144,255,0.5); }
.cat-gas   { background: var(--gas);   box-shadow: 0 0 14px rgba(245,158,11,0.5); }

.cat-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.cat-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 3px 12px;
  margin-right: auto;
}

/* ── GRID VIEW ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 48px;
}

.project-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  position: relative;
}
.project-card:hover { transform: translateY(-6px); }
.project-card.water:hover { border-color: rgba(0,144,255,0.4); box-shadow: var(--water-glow); }
.project-card.gas:hover   { border-color: rgba(245,158,11,0.4); box-shadow: var(--gas-glow); }

.card-thumb {
  height: 185px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.8);
  transition: transform 0.4s, filter 0.4s;
}
.project-card:hover .card-thumb img {
  transform: scale(1.06);
  filter: brightness(1);
}

.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  background: var(--bg-mid);
  position: relative;
}
.thumb-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(0,144,255,0.1), transparent 60%);
}
.project-card.gas .thumb-placeholder::after {
  background: radial-gradient(circle at 30% 30%, rgba(245,158,11,0.1), transparent 60%);
}

.card-type-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}
.badge-water { background: rgba(0,144,255,0.25); border: 1px solid rgba(0,144,255,0.5); color: #60b4ff; }
.badge-gas   { background: rgba(245,158,11,0.25); border: 1px solid rgba(245,158,11,0.5); color: #fbbf24; }

.card-status {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(8,18,26,0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.status-done   .status-dot { background: #00e5c0; }
.status-active .status-dot { background: #f59e0b; animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.card-body { padding: 22px 20px 24px; flex: 1; display: flex; flex-direction: column; }

.card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.card-location::before { content: "📍"; font-size: 0.7rem; }

.card-name {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  line-height: 1.4;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
  line-height: 1.6;
}

.card-specs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}
.spec-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── LIST VIEW ── */
.projects-list { padding-bottom: 48px; display: flex; flex-direction: column; gap: 12px; }

.list-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  align-items: stretch;
}
.list-card:hover { transform: translateX(-4px); }
.list-card.water:hover { border-color: rgba(0,144,255,0.35); box-shadow: var(--water-glow); }
.list-card.gas:hover   { border-color: rgba(245,158,11,0.35); box-shadow: var(--gas-glow); }

.list-color-bar {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.list-card.water .list-color-bar { background: rgba(0,144,255,0.1); border-left: 3px solid var(--water); }
.list-card.gas   .list-color-bar { background: rgba(245,158,11,0.1); border-left: 3px solid var(--gas); }

.list-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.list-name { font-size: 0.97rem; font-weight: 800; margin-bottom: 5px; }
.list-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.list-detail span { display: flex; align-items: center; gap: 4px; }

.list-right {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

/* ── SPACER ── */
.spacer { height: 120px; }

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .page-header { padding: 130px 20px 60px; grid-template-columns: 1fr; gap: 24px; }
  .header-stats { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .filter-inner { padding: 12px 20px; }
  .results-bar, .category-section { padding-left: 20px; padding-right: 20px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .list-right { min-width: 100px; }
}

@media (max-width: 600px) {
  .filter-search input { width: 120px; }
  .projects-grid { grid-template-columns: 1fr; }
  .list-card { grid-template-columns: 60px 1fr; }
  .list-right { display: none; }
  .list-color-bar { width: 60px; font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .status-dot { animation: none; }
  .project-card, .list-card { transition: none; }
}
