/* ------------------------------------------------------
   PORTFOLIO GRID (Projects Archive)
------------------------------------------------------- */

.portfolio-archive-hero {
  text-align: center;
  padding: 80px 20px 40px;
}

.portfolio-archive-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin-bottom: 10px;
  color: #111;
}

.portfolio-archive-hero p {
  color: #555;
  font-size: 1.1rem;
}

.portfolio-filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(106, 27, 154, 0.24);
  border-radius: 999px;
  color: #5b21b6;
  background: #fff;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(91, 33, 182, 0.16);
}

.filter-pill.active {
  background: #6a1b9a;
  border-color: #6a1b9a;
  color: #fff;
}

/* Grid Wrapper */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin: 40px auto;
  padding: 0 20px;
  max-width: 1200px;
}

/* ------------------------------------------------------
   PORTFOLIO GRID CARD STYLING
------------------------------------------------------- */

.portfolio-grid .project-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.3s ease;
  border: 1px solid rgba(106, 27, 154, 0.15);
}

.portfolio-grid .project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 22px rgba(106, 27, 154, 0.16);
  border-color: rgba(106, 27, 154, 0.35);
}

.portfolio-grid .project-card .project-thumb img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 15px;
}

.portfolio-grid .project-info {
  margin-top: 10px;
}

.portfolio-grid .project-title {
  font-size: 1.3rem;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.portfolio-grid .project-meta {
  font-size: 0.95rem;
  color: #6A1B9A;
  font-weight: 600;
  margin-bottom: 12px;
}

.portfolio-grid .project-highlights-preview {
  margin: 0 0 12px;
  padding-left: 18px;
}

.portfolio-grid .project-highlights-preview li {
  margin-bottom: 6px;
  color: #444;
}

.portfolio-grid .btn-view-project {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: #6A1B9A;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.25s ease;
}

.portfolio-grid .btn-view-project:hover {
  background: #55167E;
  transform: translateY(-3px);
}

.portfolio-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(106, 27, 154, 0.16);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.no-projects {
  margin: 0 0 14px;
  color: #4b5563;
}

/* Center "View All Projects" button */
.view-all-wrapper {
  text-align: center;
  margin-top: 40px;
}

.project-single-content .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.project-single-hero {
  padding: clamp(64px, 8vw, 96px) 0 34px;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #5b21b6;
  text-decoration: none;
  margin-bottom: 18px;
}

.project-back-link:hover {
  text-decoration: underline;
}

.project-title-main {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: #13111a;
}

.project-single-hero .project-meta {
  margin: 0 auto 10px;
  max-width: 640px;
}

.project-single-hero .project-meta p {
  margin: 6px 0;
  color: #374151;
}

.project-gallery {
  margin-top: 50px;
}

.project-gallery h2,
.project-gallery h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #111;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}

.project-gallery-grid .gallery-item {
  overflow: hidden;
  border-radius: 12px;
}

.project-gallery-grid .gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.3s ease;
}

.project-gallery-grid .gallery-item img:hover {
  transform: scale(1.03);
}

/* ------------------------------------------------------
   PROJECT DETAIL IMAGE TWEAKS
------------------------------------------------------- */

.project-single-hero .project-featured-img {
  max-width: 900px;
  margin: 24px auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  max-height: 520px;
  width: min(100%, 900px);
  max-width: min(100vw - 40px, 900px);
}

.project-single-hero .project-featured-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  object-fit: cover;
}

@media (max-width: 768px) {
  .project-single-hero .project-featured-img {
    max-width: 100%;
    max-height: 420px;
    margin: 16px auto 0;
  }
}

.project-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 14px;
  object-fit: cover;
}

.project-gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-gallery-grid .gallery-item {
  aspect-ratio: 4 / 3;
}

.project-gallery-grid .gallery-item img {
  height: 100%;
}

.project-next-step {
  padding: clamp(64px, 7vw, 96px) 0;
}

.project-next-step .container {
  max-width: 820px;
}

.project-next-step h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  color: #1f1028;
}

.project-next-step p {
  margin: 0 auto 24px;
  color: #4b5563;
  max-width: 640px;
}

.project-next-step-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------
   MOBILE PORTFOLIO SCROLL
------------------------------------------------------- */

@media (max-width: 768px) {
  .portfolio-archive-hero {
    padding-top: 68px;
    padding-bottom: 28px;
  }

  .portfolio-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 8px;
    gap: 8px;
    scroll-snap-type: x proximity;
  }

  .portfolio-filters::-webkit-scrollbar {
    height: 6px;
  }

  .portfolio-filters::-webkit-scrollbar-thumb {
    background: rgba(106, 27, 154, 0.38);
    border-radius: 999px;
  }

  .portfolio-filters .filter-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .portfolio-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding: 20px 12px 26px;
    max-width: none;
    scroll-snap-type: x mandatory;
  }

  .portfolio-grid::-webkit-scrollbar {
    height: 6px;
  }

  .portfolio-grid::-webkit-scrollbar-thumb {
    background: rgba(106, 27, 154, 0.45);
    border-radius: 999px;
  }

  .portfolio-grid > .project-card {
    flex: 0 0 82%;
    min-width: 260px;
    scroll-snap-align: start;
  }

  .project-card {
    margin-bottom: 0;
  }

  .project-single-hero {
    padding-top: 42px;
  }

  .project-next-step {
    padding-top: 52px;
    padding-bottom: 68px;
  }

  .project-next-step-actions .btn {
    width: min(360px, 100%);
  }
}
