/* ------------------------------------------------------
   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;
}

/* 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;
}

/* Card */
.portfolio-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

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

/* Title */
.portfolio-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: #111;
}

/* Meta */
.portfolio-card .meta {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 12px;
}

/* Highlights - preview */
.portfolio-card ul {
  padding-left: 18px;
  margin: 10px 0;
  color: #444;
}

.portfolio-card ul li {
  margin-bottom: 5px;
}

/* CTA */
.portfolio-card .btn-view {
  margin-top: 15px;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #6A1B9A;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.portfolio-card .btn-view:hover {
  background: #55167e;
}

/* ------------------------------------------------------
   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);
}

/* 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-gallery {
  margin-top: 50px;
}

.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%;
}

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

@media (max-width: 768px) {
  .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;
  }
}
