/* ================================================
   Project Detail Page - Stylesheet
   ================================================ */

/* ===== PAGE WRAPPER ===== */
.proj-detail-page {
  min-height: 80vh;
  padding: 3.5rem 0 5rem;
  background: var(--light-bg);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 2.2rem;
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 600;
  transition: opacity 0.2s;
}

.breadcrumb a:hover { opacity: 0.75; }

.bc-sep { color: #cbd5e1; font-size: 1rem; }

.bc-current { color: var(--text); font-weight: 600; }

/* ===== HEADER ===== */
.proj-detail-header { margin-bottom: 2.5rem; }

.proj-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.proj-detail-badge {
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #bfdbfe;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}

.proj-detail-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.proj-detail-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.proj-detail-summary {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.85;
  max-width: 750px;
  margin-bottom: 1.2rem;
}

.proj-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ===== COVER IMAGE ===== */
.proj-cover {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  background: #000;
}

.proj-cover img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: cover;
}

/* ===== MEDIA SECTION ===== */
.media-section {
  margin-bottom: 2.5rem;
}

.media-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Grid: 3 col desktop, 2 col tablet, 1 col mobile */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ===== MEDIA ITEM (thumbnail card) ===== */
.media-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.media-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.13);
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.media-item:hover img,
.media-item:hover video {
  opacity: 0.85;
}

/* Play icon overlay for video thumbnails */
.media-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.2s, transform 0.2s;
}

.media-item:hover .media-play-icon {
  background: rgba(37, 99, 235, 0.85);
  transform: translate(-50%, -50%) scale(1.1);
}

.media-play-icon svg {
  width: 20px; height: 20px;
  fill: #fff;
  margin-right: -2px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

/* Close button */
.lb-close {
  position: fixed;
  top: 1.2rem; right: 1.2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.lb-close:hover { background: rgba(255,255,255,0.2); }

.lb-close svg { width: 20px; height: 20px; }

/* Prev / Next arrows */
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.lb-arrow:hover { background: rgba(255,255,255,0.22); }
.lb-arrow svg { width: 22px; height: 22px; }

.lb-prev { left: 1.2rem; }
.lb-next { right: 1.2rem; }

/* hide arrows when single item */
.lb-arrow.hidden { display: none; }

/* Content area */
.lb-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.lb-content video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  background: #000;
  display: block;
}

/* Counter (۱ از ۳) */
.lb-counter {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ===== FULL CONTENT BODY ===== */
.proj-detail-body {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  margin-bottom: 2.5rem;
  text-align: justify;
}

.proj-detail-content h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin: 2rem 0 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eff6ff;
}

.proj-detail-content h2:first-child { margin-top: 0; }

.proj-detail-content p {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.proj-detail-content ul,
.proj-detail-content ol {
  padding-right: 1.4rem;
  margin-bottom: 1rem;
}

.proj-detail-content li {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 0.3rem;
}

.proj-detail-content strong {
  color: var(--primary);
  font-weight: 700;
}

/* ===== CONTACT CTA ===== */
.proj-contact-cta {
  background: var(--primary);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.proj-contact-cta::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
}

.cta-text h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
}

.cta-text p {
  font-size: 0.88rem;
  color: #94a3b8;
}

.cta-btn { flex-shrink: 0; white-space: nowrap; }

/* ===== BACK BUTTON ===== */
.proj-back { display: flex; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .media-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .proj-detail-page { padding: 2rem 0 4rem; }
  .proj-detail-body { padding: 1.5rem 1.2rem; }
  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .proj-contact-cta { padding: 1.8rem 1.4rem; }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
}
