/* ============================================================
   PROJECT PAGES - List & Detail
   Bootstrap + Custom CSS
============================================================ */

:root {
  --primary: #2563eb;
  --secondary: #64748b;
  --dark: #1e293b;
  --light: #f8fafc;
  --border: #e2e8f0;
  --success: #10b981;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BREADCRUMB
============================================ */
.pj-breadcrumb-section {
  background: #fff;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.pj-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pj-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.pj-breadcrumb-item:hover {
  color: var(--primary);
}

.pj-breadcrumb-separator {
  color: var(--border);
  font-size: 12px;
}

.pj-breadcrumb-current {
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
}

/* ============================================
   LIST PAGE - HEADER
============================================ */
.pj-list-header {
  background: linear-gradient(135deg, #1e40af 0%, var(--primary) 100%);
  padding: 50px 0 40px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pj-list-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.pj-list-title {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}

.pj-list-subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ============================================
   LIST PAGE - GRID
============================================ */
.pj-list-section {
  padding: 50px 0 60px;
  background: var(--light);
}

.pj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pj-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.35s,
    box-shadow 0.35s;
}

.pj-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  color: inherit;
  text-decoration: none;
}

.pj-card-image {
  position: relative;
  padding-top: 65%;
  overflow: hidden;
}

.pj-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pj-card:hover .pj-card-image img {
  transform: scale(1.08);
}

.pj-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s;
}

.pj-card:hover .pj-card-overlay {
  opacity: 1;
}

.pj-card-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(10px);
  transition: transform 0.35s;
}

.pj-card:hover .pj-card-view-btn {
  transform: translateY(0);
}

.pj-card-body {
  padding: 20px 22px;
}

.pj-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pj-card-desc {
  font-size: 14px;
  color: var(--secondary);
  margin: 0 0 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pj-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pj-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--secondary);
}

.pj-meta-item i {
  color: var(--primary);
  font-size: 14px;
}

/* ============================================
   PAGINATION
============================================ */
.pj-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
}

.pj-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.pj-page-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pj-page-link.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================
   EMPTY STATE
============================================ */
.pj-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--secondary);
}

.pj-empty-state i {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.pj-empty-state h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.pj-empty-state p {
  font-size: 15px;
}

/* ============================================
   CTA SECTION (LIST PAGE)
============================================ */
.pj-cta-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #1e40af 0%, var(--primary) 100%);
  text-align: center;
  color: #fff;
}

.pj-cta-content h2 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 12px;
}

.pj-cta-content p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0 0 24px;
}

.pj-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #fff;
  color: var(--primary);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.pj-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: var(--primary);
}

/* ============================================
   DETAIL PAGE
============================================ */
.pj-detail-section {
  padding: 40px 0 60px;
  background: var(--light);
}

.pj-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.pj-detail-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.pj-detail-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 16px;
  line-height: 1.35;
}

.pj-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.pj-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--secondary);
  font-weight: 500;
}

.pj-detail-meta-item i {
  color: var(--primary);
}

/* ============================================
   DETAIL - MAIN IMAGE & GALLERY
============================================ */
.pj-detail-main-image {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  margin-bottom: 16px;
  aspect-ratio: 16 / 10;
}

.pj-detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.3s;
}

.pj-gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 28px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.pj-gallery-thumbs::-webkit-scrollbar {
  height: 4px;
}

.pj-gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.pj-gallery-thumbs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.pj-thumb-item {
  flex: 0 0 80px;
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.25s;
}

.pj-thumb-item:hover,
.pj-thumb-item.active {
  border-color: var(--primary);
  opacity: 1;
}

.pj-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   DETAIL - CONTENT
============================================ */
.pj-detail-summary {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f7ff 100%);
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 28px;
}

.pj-detail-summary p {
  margin: 0;
  font-size: 15px;
  color: var(--dark);
  line-height: 1.7;
  font-style: italic;
}

.pj-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.pj-detail-content h2,
.pj-detail-content h3 {
  color: var(--dark);
  margin-top: 28px;
  margin-bottom: 14px;
  font-weight: 700;
}

.pj-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 16px 0;
  display: block;
}

.pj-detail-content p {
  margin-bottom: 14px;
}

.pj-detail-content ul,
.pj-detail-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.pj-detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  overflow-x: auto;
  display: block;
}

.pj-detail-content table th,
.pj-detail-content table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

/* ============================================
   DETAIL - SHARE
============================================ */
.pj-detail-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  margin-top: 28px;
  border-top: 1px solid var(--border);
}

.pj-share-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pj-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--secondary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.pj-share-btn:hover {
  color: #fff;
  border-color: transparent;
}

.pj-share-fb:hover {
  background: #1877f2;
}

.pj-share-copy:hover {
  background: var(--primary);
}

/* ============================================
   DETAIL - CONTENT EMBEDDED VIDEO (iframe)
============================================ */
.pj-detail-content iframe {
  max-width: 100%;
  border-radius: 12px;
  margin: 16px 0;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* ============================================
   SIDEBAR
============================================ */
.pj-sidebar-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.pj-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.pj-sidebar-title i {
  color: var(--primary);
}

.pj-info-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pj-info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pj-info-label {
  font-size: 13px;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.pj-info-value {
  font-size: 14px;
  color: var(--dark);
  font-weight: 600;
  text-align: right;
}

/* ============================================
   SIDEBAR - CTA
============================================ */
.pj-sidebar-cta {
  background: linear-gradient(135deg, #1e40af 0%, var(--primary) 100%);
  border-radius: 16px;
  padding: 28px 24px;
  color: #fff;
  text-align: center;
  margin-bottom: 24px;
}

.pj-sidebar-cta h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
}

.pj-sidebar-cta p {
  font-size: 14px;
  opacity: 0.9;
  margin: 0 0 18px;
  line-height: 1.6;
}

.pj-sidebar-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #fff;
  color: var(--primary);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.pj-sidebar-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  color: var(--primary);
}

/* ============================================
   SIDEBAR - RELATED PROJECTS
============================================ */
.pj-related-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pj-related-item {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.25s;
}

.pj-related-item:hover {
  background: var(--light);
  color: inherit;
}

.pj-related-image {
  flex: 0 0 70px;
  width: 70px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
}

.pj-related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pj-related-info {
  flex: 1;
  min-width: 0;
}

.pj-related-info h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pj-related-info span {
  font-size: 12px;
  color: var(--secondary);
}

/* ============================================
   LIGHTBOX
============================================ */
.pj-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.pj-lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pj-lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
}

.pj-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
}

.pj-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pj-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
}

.pj-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pj-lightbox-prev {
  left: 20px;
}

.pj-lightbox-next {
  right: 20px;
}

.pj-lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 16px;
  border-radius: 20px;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 991px) {
  .pj-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .pj-detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pj-detail-card {
    padding: 24px;
  }

  .pj-detail-title {
    font-size: 24px;
  }

  .pj-list-title {
    font-size: 30px;
  }

  .pj-detail-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .pj-sidebar-card,
  .pj-sidebar-cta {
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .pj-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pj-list-header {
    padding: 35px 0 28px;
  }

  .pj-list-title {
    font-size: 26px;
  }

  .pj-detail-layout {
    gap: 20px;
  }

  .pj-detail-card {
    padding: 16px;
    border-radius: 12px;
  }

  .pj-detail-title {
    font-size: 20px;
  }

  .pj-detail-meta {
    gap: 10px;
  }

  .pj-detail-meta-item {
    font-size: 13px;
  }

  .pj-detail-main-image {
    border-radius: 10px;
    aspect-ratio: 16 / 11;
  }

  .pj-thumb-item {
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
  }

  .pj-detail-summary {
    padding: 14px 16px;
  }

  .pj-detail-content {
    font-size: 14px;
  }

  .pj-detail-sidebar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pj-sidebar-card {
    padding: 20px;
    border-radius: 12px;
  }

  .pj-sidebar-cta {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .pj-cta-content h2 {
    font-size: 24px;
  }

  .pj-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .pj-lightbox-prev {
    left: 10px;
  }

  .pj-lightbox-next {
    right: 10px;
  }

  .pj-lightbox-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .pj-lightbox-img {
    max-width: 95%;
    max-height: 80vh;
  }

  .pj-detail-share {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .pj-detail-card {
    padding: 14px;
  }

  .pj-detail-title {
    font-size: 18px;
  }

  .pj-breadcrumb {
    font-size: 13px;
    gap: 6px;
  }

  .pj-thumb-item {
    flex: 0 0 56px;
    width: 56px;
    height: 42px;
  }

  .pj-related-image {
    flex: 0 0 60px;
    width: 60px;
    height: 45px;
  }
}
