/* ======================================================
   PROJECT MASONRY + FILTER SYSTEM (HỖ TRỢ NHIỀU SOFTWARE)
   ====================================================== */

.pm-root {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Filter Bar ── */
.pm-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  margin-bottom: 40px;
}

/* Software Pills */
.pm-software-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button.pm-sw-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

button.pm-sw-pill:hover {
  border-color: #0061fe;
  border-width: 1px;
  color: #0061fe;
  background: #f0f6ff;
  transform: translateY(-1px);
}

button.pm-sw-pill.is-active {
  background: #0061fe;
  border-color: #0061fe;
  color: #ffffff;
  font-weight: 600;
}

.pm-sw-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  transition: filter 0.25s ease;
}

.pm-sw-pill.is-active .pm-sw-logo {
  filter: brightness(0) invert(1);
}

/* Level Filter */
.pm-level-filter {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  padding: 8px 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.pm-lvl-text {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  min-width: 65px;
}

.pm-lvl-icons {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.pm-lvl-icon {
  cursor: pointer;
  transition: all 0.2s ease;
  transform-origin: bottom center;
}

.pm-lvl-icon:hover {
  transform: scale(1.1);
}

.pm-lvl-icon.off {
  opacity: 0.25;
  filter: grayscale(100%);
}

.pm-lvl-icon.on {
  opacity: 1;
  filter: none;
}

/* ── Masonry Grid ── */
.bls-project-masonry {
  column-count: 3;
  column-gap: 20px;
  width: 100%;
  transition: opacity 0.3s ease;
}

/* Project Card */
.bls-project-card {
  display: block;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background: #f0f0f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.bls-project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.bls-pj-bg {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.bls-project-card:hover .bls-pj-bg {
  transform: scale(1.05);
}

/* Overlay & Glassmorphism */
.bls-pj-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.2) 100%
  );
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.bls-pj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

/* Vùng chứa danh sách các software (được xếp chồng cột dọc ở bên phải) */
.bls-pj-software-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  max-width: 50%;
}

.glass-morphism {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Project Icons & Meta */
.bls-pj-level {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.bls-level-icons {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.bls-lvl-icon {
  display: block;
}
.bls-lvl-icon.off {
  opacity: 0.3;
  filter: grayscale(100%);
}

.bls-pj-software {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  padding: 4px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.bls-pj-software .bls-sw-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.bls-sw-name {
  font-size: 12px;
  font-weight: 600;
  color: #111;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Hover Title */
.bls-pj-hover-info {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.bls-project-card:hover .bls-pj-hover-info {
  opacity: 1;
  transform: translateY(0);
}

.bls-pj-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Load More button ── */
.pm-hidden {
  display: none !important;
}

.pm-load-more-wrap {
  text-align: center;
  padding: 40px 0;
  clear: both;
}

.pm-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 36px;
  border-radius: 999px;
  border: 1.5px solid #0061fe;
  background: transparent;
  color: #0061fe;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pm-load-more-btn:hover {
  background: #0061fe;
  color: #ffffff;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .bls-project-masonry {
    column-count: 2;
  }
  .pm-filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .bls-project-masonry {
    column-count: 1;
  }
  .bls-pj-hover-info {
    opacity: 1;
    transform: translateY(0);
  }
}
