/* ==========================================
   PROJECT DETAIL PAGE — CSS
   ========================================== */

/* Base override for project page */
.project-page {
  background: #0a0a12;
}

/* ==========================================
   PROJECT HERO
   ========================================== */
.project-hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-hero-img {
  position: absolute;
  inset: 0;
}

.project-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.project-hero:hover .project-hero-img img {
  transform: scale(1);
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 8, 18, 0.97) 0%,
    rgba(8, 8, 18, 0.5) 50%,
    rgba(8, 8, 18, 0.15) 100%
  );
}

.project-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 52px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: #0a8fa7; }
.breadcrumb-sep { color: rgba(255,255,255,0.3); }
.breadcrumb span:last-child { color: rgba(255,255,255,0.7); }

.project-cat-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(212,168,83,0.15);
  border: 1px solid rgba(212,168,83,0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #0a8fa7;
  margin-bottom: 16px;
}

.project-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 12px;
}

.project-hero-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

/* ==========================================
   PROJECT BODY
   ========================================== */
.project-body {
  background: #0a0a12;
  padding: 60px 0 0;
}

.project-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Two-column layout */
.project-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 80px;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.project-sidebar {
  position: sticky;
  top: 100px;
}

.project-info-card {
  background: rgba(20, 20, 40, 0.8);
  border: 1px solid rgba(212,168,83,0.12);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 16px;
}

.info-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: #0a8fa7;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 12px;
}

.info-item:last-child { border-bottom: none; }

.info-item-block {
  flex-direction: column;
  gap: 10px;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

.info-value {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
  text-align: right;
}

.materials-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(212,168,83,0.1);
  border: 1px solid rgba(212,168,83,0.2);
  border-radius: 100px;
  font-size: 0.73rem;
  color: #0a8fa7;
}

.project-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0a8fa7, #077a8f);
  color: #0a0a12;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 10px;
}

.project-cta-btn:hover {
  background: linear-gradient(135deg, #12adc9, #0a8fa7);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,168,83,0.25);
}

.project-back-btn {
  display: block;
  text-align: center;
  padding: 11px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: all 0.2s;
}

.project-back-btn:hover {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.2);
}

/* ==========================================
   PROJECT MAIN
   ========================================== */
.project-section {
  margin-bottom: 52px;
}

.project-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #f0f0f8;
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(212,168,83,0.3), transparent);
}

.project-description {
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.65);
}

/* Challenge & Solution */
.challenge-solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 52px;
}

.cs-card {
  border-radius: 14px;
  padding: 28px;
  border: 1px solid;
}

.challenge-card {
  background: rgba(231,76,60,0.05);
  border-color: rgba(231,76,60,0.15);
}

.solution-card {
  background: rgba(46,204,113,0.05);
  border-color: rgba(46,204,113,0.15);
}

.cs-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.cs-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #f0f0f8;
}

.cs-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.6);
}

/* ==========================================
   GALLERY
   ========================================== */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* First image spans 2 columns */
.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 1;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: rgba(20,20,40,0.6);
}

.gallery-item:first-child {
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,18,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: #fff;
}

.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ==========================================
   LIGHTBOX
   ========================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.lightbox.open {
  display: flex;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10000;
}

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

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10000;
  line-height: 1;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(212,168,83,0.2);
  border-color: rgba(212,168,83,0.4);
}

.lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.5);
  padding: 6px 16px;
  border-radius: 100px;
}

/* ==========================================
   RELATED PROJECTS
   ========================================== */
.related-projects {
  padding: 60px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0;
}

.related-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: #f0f0f8;
}

.text-accent { color: #0a8fa7; font-style: italic; }
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #0a8fa7;
  margin-bottom: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.related-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20,20,40,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s;
}

.related-card:hover {
  border-color: rgba(212,168,83,0.2);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.related-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.related-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.related-card:hover .related-img-wrap img { transform: scale(1.05); }

.related-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,18,0.9) 0%, transparent 60%);
}

.related-info {
  padding: 18px 20px;
}

.related-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #0a8fa7;
  display: block;
  margin-bottom: 6px;
}

.related-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0f0f8;
  margin-bottom: 4px;
}

.related-loc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

/* ==========================================
   CTA STRIP
   ========================================== */
.project-cta-strip {
  background: linear-gradient(135deg, rgba(212,168,83,0.08), rgba(180,100,60,0.05));
  border-top: 1px solid rgba(212,168,83,0.12);
  padding: 60px 0;
  margin-top: 0;
}

.cta-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-strip-inner h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #f0f0f8;
}

.cta-strip-inner p {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}

/* Reuse main site button styles */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: linear-gradient(135deg, #0a8fa7, #077a8f); color: #0a0a12; }
.btn-primary:hover { background: linear-gradient(135deg, #12adc9, #0a8fa7); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,168,83,0.25); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .project-layout { grid-template-columns: 260px 1fr; gap: 40px; }
  .challenge-solution-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .project-hero { height: 50vh; }
  .project-hero-content { padding: 0 20px 36px; }
  .project-layout { grid-template-columns: 1fr; }
  .project-sidebar { position: static; }
  .project-container { padding: 0 20px; }
  .project-body { padding: 40px 0 0; }
  .project-gallery { grid-template-columns: 1fr 1fr; }
  .gallery-item:first-child { grid-column: span 2; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .cta-strip-inner { flex-direction: column; text-align: center; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
  .project-gallery { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: span 1; }
  .related-grid { grid-template-columns: 1fr; }
  .project-layout { gap: 28px; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
