/* =========================================================
   BLH – Past Project Page (FINAL CSS)
   - 6 cards grid
   - Hover reveal white info pill
   - Only project title clickable
========================================================= */

:root{
  --blh-container: 1320px;
  --blh-pad: 24px;

  --blh-green: #0a8a4b;
  --blh-text: #101828;

  --blh-radius: 18px;
  --blh-shadow: 0 18px 45px rgba(0,0,0,.10);
}

/* container */
.blh-container{
  width: min(var(--blh-container), calc(100% - var(--blh-pad)*2));
  margin: 0 auto;
}

/* section spacing */
.blh-projects{
  padding: 60px 0;
}

/* grid */
.blh-projects-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* =========================================================
   Card
========================================================= */
.blh-project-card{
  position: relative;
  border-radius: var(--blh-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--blh-shadow);
  transform: translateZ(0);
}

/* image */
.blh-project-media{
  aspect-ratio: 4 / 3;
  background: #f3f5f7;
}

.blh-project-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .45s ease;
}

/* =========================================================
   Overlay (hidden by default)
========================================================= */
.blh-project-overlay{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 18px;
  display: flex;
  align-items: flex-end;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;

  background: linear-gradient(
    to top,
    rgba(0,0,0,.28),
    rgba(0,0,0,0) 70%
  );
}

/* =========================================================
   White info pill
   - NOT clickable
========================================================= */
.blh-project-pill{
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  min-width: min(360px, 80%);
  box-shadow: 0 14px 30px rgba(0,0,0,.12);

  pointer-events: none; /* 🔒 pill itself not clickable */
}

.blh-project-meta{
  font-size: 13px;
  font-weight: 600;
  color: var(--blh-green);
  margin-bottom: 4px;
}

/* =========================================================
   Project title link (ONLY clickable part)
========================================================= */
.blh-project-link{
  display: inline-block;
  font-size: 18px;
  font-weight: 800;
  color: var(--blh-text);
  line-height: 1.2;
  text-decoration: none;
  transition: color .2s ease;
  pointer-events: auto; /* ✅ allow click */
}

/* ✅ hover 变绿色（像你图那样） */
.blh-project-link:hover{
  color: var(--blh-green);
  text-decoration: none;
}
/* =========================================================
   Hover interactions
========================================================= */
.blh-project-card:hover .blh-project-media img{
  transform: scale(1.06);
}

.blh-project-card:hover .blh-project-overlay{
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Touch devices (no hover)
========================================================= */
@media (hover: none){
  .blh-project-overlay{
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 1024px){
  .blh-projects-grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .blh-project-pill{
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 640px){
  .blh-projects-grid{
    grid-template-columns: 1fr;
  }
}

/* Pagination */
.blh-pagination{
  display:flex;
  justify-content:center;
  margin-top: 28px;
}

.blh-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  margin: 0 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
  color: var(--blh-text);
  text-decoration:none;
  font-weight: 700;
}

.blh-pagination .page-numbers.current{
  background: var(--blh-green);
  color:#fff;
}

.blh-pagination .page-numbers:hover{
  color: var(--blh-green);
}

/* ===============================
   Pagination (fix hover readability)
================================ */

.blh-pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  margin-top: 28px;
}

/* Base button */
.blh-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;

  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.08);

  color: var(--blh-text);
  text-decoration: none;
  font-weight: 800;

  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

/* Current page: keep readable always */
.blh-pagination .page-numbers.current{
  background: var(--blh-green) !important;
  color: #fff !important;
}

/* Hover only affects NON-current links */
.blh-pagination a.page-numbers:hover{
  background: rgba(10,138,75,.10);
  color: var(--blh-green);
  box-shadow: 0 14px 28px rgba(0,0,0,.10);
}

/* Prevent hover styles from messing current */
.blh-pagination .page-numbers.current:hover{
  background: var(--blh-green) !important;
  color: #fff !important;
}

/* Dots style */
.blh-pagination .page-numbers.dots{
  background: transparent;
  box-shadow: none;
  min-width: auto;
  padding: 0 6px;
  color: rgba(16,24,40,.45);
}
