/* ===== Portfolio Redesign ===== */

/* Filter buttons */
.portfolio-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-bottom: 4px;
}

.portfolio-filter-btn {
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.2px;
}

.portfolio-filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}

.portfolio-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.portfolio-filter-btn:focus {
  outline: none;
}

/* Grid wrapper — overrides old filterDiv floats */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 0;
  margin: 0;
}

@media (max-width: 991px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* Card */
.portfolio-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  text-decoration: none !important;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

/* Image */
.portfolio-card-img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-card-img {
  transform: scale(1.06);
}

/* Dark overlay — always present, content slides up on hover */
.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(17, 19, 43, 0.92) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-card-overlay {
  opacity: 1;
}

.portfolio-card-info {
  flex: 1;
  min-width: 0;
}

.portfolio-card-info h4 {
  color: #fff !important;
  font-size: 16px !important;
  line-height: 20px !important;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-card-info p {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 13px !important;
  line-height: 17px !important;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-card-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  flex-shrink: 0;
  margin-left: 12px;
  transition: background 0.2s;
  text-decoration: none !important;
}

.portfolio-card-arrow:hover {
  background: var(--light-purple-color);
  color: #fff !important;
}

/* Category badge on image */
.portfolio-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.3);
}

/* Fade-in when items appear */
@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.portfolio-card-enter {
  animation: fadeInCard 0.35s ease forwards;
}

/* override hardcoded height:544px from style.css */
.portfolio-con {
  height: auto !important;
  padding-bottom: 80px;
}

/* overlap cards over the purple header */
.portfolio-body-new {
  margin-top: -60px;
  padding-bottom: 80px;
}

@media (max-width: 991px) {
  .portfolio-body-new { margin-top: -40px; }
}

@media (max-width: 767px) {
  .portfolio-body-new { margin-top: -30px; }
}

/* Show More button */
.portfolio-show-more {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.portfolio-show-more-btn {
  border: 2px solid var(--light-purple-color);
  background: transparent;
  color: var(--light-purple-color);
  font-size: 16px;
  font-weight: 600;
  padding: 12px 40px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Josefin Sans', sans-serif;
}

.portfolio-show-more-btn:hover {
  background: var(--light-purple-color);
  color: #fff;
}

.portfolio-show-more-btn:focus {
  outline: none;
}

/* ===== Project Detail Page ===== */

.pd-page {
  min-height: 100vh;
  background: #fff;
}

/* Carousel */
.pd-carousel {
  position: relative;
  width: 100%;
  background: #111;
  overflow: hidden;
  aspect-ratio: 16 / 8;
  max-height: 520px;
}

.pd-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pd-carousel-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.pd-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-carousel-slide--mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f0f1a;
}
.pd-carousel-slide--mobile img {
  width: auto;
  height: 90%;
  max-width: 42%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.pd-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6f34fe;
  border: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(111, 52, 254, 0.4);
}
.pd-carousel-btn:hover { background: #5a28d4; transform: translateY(-50%) scale(1.08); }
.pd-carousel-btn:focus { outline: none; }
.pd-carousel-prev { left: 16px; }
.pd-carousel-next { right: 16px; }

.pd-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}

.pd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.pd-dot.active { background: #fff; transform: scale(1.3); }
.pd-dot:focus { outline: none; }

.pd-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #6f34fe;
  border: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 3;
  box-shadow: 0 4px 16px rgba(111, 52, 254, 0.4);
}
.pd-back-btn:hover { background: #5a28d4; transform: scale(1.08); }
.pd-back-btn:focus { outline: none; }

.pd-counter {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Josefin Sans', sans-serif;
  z-index: 2;
}

/* Content area — full width */
.pd-content {
  width: 100%;
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 768px) {
  .pd-content { padding: 40px 48px 100px; }
}

@media (min-width: 1200px) {
  .pd-content { padding: 48px 80px 100px; }
}

.pd-section {
  padding: 28px 0;
}

.pd-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
}

.pd-badge {
  display: inline-block;
  background: #6f34fe;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pd-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
  line-height: 1.3;
}

.pd-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.75;
  margin: 0;
}

.pd-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-section-title i {
  color: #6f34fe;
}

/* Skills chips */
.pd-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pd-skill-chip {
  background: #fff;
  border: 1.5px solid #e0d6ff;
  color: #6f34fe;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 30px;
  font-family: 'Josefin Sans', sans-serif;
  box-shadow: 0 2px 8px rgba(111,52,254,0.07);
}

/* Thumbnail grid */
.pd-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.pd-thumb-item {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #ddd;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.pd-thumb-item:hover { transform: scale(1.03); }
.pd-thumb-item.active { border-color: #6f34fe; }
.pd-thumb-item:focus { outline: none; }

.pd-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-thumb-item--mobile {
  aspect-ratio: 9 / 16;
  background: #0f0f1a;
}
.pd-thumb-item--mobile img {
  object-fit: contain;
}

.pd-not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}

@media (min-width: 768px) {
  .pd-carousel { aspect-ratio: 16 / 7; }
}
