/* Project Detail Page Styles */
:root {
  --primary-color: #2563eb;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --border-light: #e5e7eb;
  --bg-light: #f9fafb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #ffffff;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Header - Matches rest of website EXACTLY */
header {
  background-color: #1a1a2e;
  color: #fff;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

header:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

header .logo {
  margin-left: 1rem;
  transition: transform 0.4s ease;
}

header .logo:hover {
  transform: translateY(-2px);
}

header .logo span {
  font-size: 1.6rem;
  font-weight: bold;
  background: linear-gradient(90deg, #4361ee, #4895ef);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  transition: all 0.4s ease;
}

nav {
  margin-right: 1rem;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  margin: 0;
}

nav ul li {
  margin: 0;
  position: relative;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.4s ease;
  position: relative;
  display: inline-block;
}

nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #4361ee;
  transition: width 0.4s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a:hover {
  color: #4361ee;
  transform: translateY(-2px);
}

/* Active nav link */
nav ul li a.active,
nav ul li a[aria-current="page"] {
  color: #4361ee;
}

nav ul li a.active::after,
nav ul li a[aria-current="page"]::after {
  width: 100%;
}

/* Floating Back Button */
.floating-back-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: white;
  color: var(--text-dark);
  padding: 0.875rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 999;
  border: 1px solid var(--border-light);
}

.floating-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.floating-back-btn i {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.floating-back-btn:hover i {
  transform: translateX(-3px);
}

/* Main Content */
main {
  min-height: calc(100vh - 70px);
}

/* Hero Section */
.project-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 2rem;
  color: white;
  text-align: center;
}

.project-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: "Space Grotesk", sans-serif;
}

.project-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-item i {
  opacity: 0.9;
}

/* Tech Badges */
.tech-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.tech-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Content Container */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Overview Section */
.overview-section {
  margin-bottom: 4rem;
}

.overview-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-family: "Space Grotesk", sans-serif;
}

.overview-section p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-gray);
  margin-bottom: 1.25rem;
}

/* Image Gallery */
.image-gallery {
  margin: 4rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

/* Details Section */
.details-section {
  background: var(--bg-light);
  padding: 3rem;
  border-radius: 12px;
  margin: 4rem 0;
}

.details-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-dark);
  font-family: "Space Grotesk", sans-serif;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.detail-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.detail-item p,
.detail-item ul {
  color: var(--text-gray);
  line-height: 1.8;
}

.detail-item ul {
  list-style: none;
  padding-left: 0;
}

.detail-item li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.detail-item li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 600;
}

/* Challenge & Solution Sections */
.challenge-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 4rem 0;
}

.challenge-box,
.solution-box {
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid var(--border-light);
}

.challenge-box {
  background: #fef2f2;
  border-color: #fecaca;
}

.solution-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.challenge-box h3,
.solution-box h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.challenge-box h3 {
  color: #991b1b;
}

.solution-box h3 {
  color: #166534;
}

/* Links Section */
.project-links {
  display: flex;
  gap: 1rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--text-dark);
  border: 2px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Footer */
footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 2rem;
  margin-top: 6rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-top: 1.5rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 0.5rem 1rem;
  }

  header .logo {
    margin-left: 0;
  }

  nav {
    margin-right: 0;
  }

  nav ul {
    gap: 0.7rem;
  }

  nav ul li a {
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
  }

  .project-hero h1 {
    font-size: 2rem;
  }

  .project-meta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .challenge-solution {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .content-container {
    padding: 2rem 1rem;
  }

  .details-section {
    padding: 2rem 1.5rem;
  }

  .floating-back-btn {
    bottom: 1rem;
    left: 1rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  header {
    flex-direction: column;
    height: auto;
    padding: 1rem;
  }

  header .logo {
    margin-bottom: 1rem;
    margin-left: 0;
  }

  nav {
    margin-right: 0;
  }
}

/* Modal for full-size images */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 2rem;
  right: 3rem;
  color: white;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.close-modal:hover {
  opacity: 0.7;
}
