
*, *::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);
  --accent2:    #0090ff;
  --text-main:  #e8f0f5;
  --text-muted: rgba(232,240,245,0.6);
  --border:     rgba(255,255,255,0.1);
  --glow:       0 0 40px rgba(0,229,192,0.18);
}

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);
  transition: background 0.3s;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.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 { 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);
}

.nav-home-btn svg { width: 16px; height: 16px; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 150px 40px 60px;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--accent); }

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,229,192,0.12);
  border: 1px solid rgba(0,229,192,0.35);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 22px;
}

.page-title {
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 16px;
  max-width: 920px;
}

.page-sub {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 720px;
}

/* ── reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.reveal.visible { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-stagger.visible > * { opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: .4s; }

/* ── GALLERY ── */
.gallery-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
}

.gallery-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: brightness(0.85);
}

.gallery-main:hover img,
.gallery-thumb:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}

.gallery-more {
  position: absolute;
  inset: 0;
  background: rgba(8,18,26,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-thumb:last-child .gallery-more { opacity: 1; }

.gallery-more span:first-child {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
}

.gallery-more span:last-child {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── MAIN LAYOUT ── */
.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 40px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: start;
}

/* ── INFO CARDS GRID ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  transition: border-color 0.3s, transform 0.3s;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-card:hover {
  border-color: rgba(0,229,192,0.3);
  transform: translateY(-3px);
}

.info-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,192,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.info-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.status-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ── DESCRIPTION ── */
.description-block {
  margin-top: 48px;
}

.description-block h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.description-block p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 16px;
}

.highlight-list {
  list-style: none;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.highlight-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-main);
  padding-right: 2px;
}

.highlight-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,192,0.4);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
}

.sidebar-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.spec-row:last-child { border-bottom: none; }
.spec-row span:first-child { color: var(--text-muted); }
.spec-row span:last-child { font-weight: 700; color: var(--text-main); }

.sidebar-cta {
  background: linear-gradient(160deg, var(--accent-dim), transparent);
  border: 1px solid rgba(0,229,192,0.3);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
}

.sidebar-cta h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.sidebar-cta p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-primary {
  padding: 13px 24px;
  border-radius: 50px;
  background: var(--accent);
  color: #08121a;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 24px rgba(0,229,192,0.3);
  display: inline-block;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0,229,192,0.45);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 40px;
}

/* ── RELATED PROJECTS CAROUSEL ── */
.related-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 90px 40px 110px;
}

.related-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.related-heading .section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.related-heading h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 900;
}

.carousel-nav {
  display: flex;
  gap: 10px;
}

.carousel-nav button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.related-track-wrap {
  overflow: hidden;
}

.related-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(.2,.7,.3,1);
}

.related-card {
  flex: 0 0 calc((100% - 48px) / 3);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.3s, border-color 0.3s;
  text-decoration: none;
  color: var(--text-main);
  display: block;
}

.related-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,229,192,0.3);
}

.related-thumb {
  height: 190px;
  background: linear-gradient(135deg, var(--bg-mid), var(--bg-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  position: relative;
  overflow: hidden;
}

.related-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(0,229,192,0.12), transparent 60%);
}

.related-body { padding: 22px; }

.related-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.related-card h4 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.related-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8,18,26,0.95);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .page-header { padding: 130px 20px 50px; }
  .gallery-section { padding: 0 20px 30px; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }
  .gallery-main { height: 280px; grid-row: auto; }
  .gallery-thumb { height: 160px; }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 50px 20px;
    gap: 40px;
  }
  .sidebar { position: static; }

  .info-grid { grid-template-columns: 1fr; }

  .related-section { padding: 70px 20px 90px; }
  .related-card { flex: 0 0 calc((100% - 24px) / 2); }
}

@media (max-width: 600px) {
  .gallery-grid { display: none; }
  .info-grid { grid-template-columns: 1fr; }
  .related-card { flex: 0 0 100%; }
  .divider { margin: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
