/* =============================================
   Block: magnet/posts-grid
   Magnet People v2 — Takariwa Studio
   ============================================= */

.magnet-posts-grid {
  padding: 72px 0;
  background: #fff;
}

.magnet-posts-grid__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Título de sección */
.magnet-posts-grid__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 40px;
}

/* Grid */
.magnet-posts-grid__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card */
.post-card {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  position: relative;
}

/* Link = toda la card */
.post-card__link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #e5e5e5;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  text-decoration: none;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.post-card__link:hover {
  transform: scale(1.02);
}

/* Overlay degradado para que el título sea legible */
.post-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.65) 100%
  );
  border-radius: 24px;
}

/* Card sin imagen */
.post-card:not([style]) .post-card__link,
.post-card__link:not([style]) {
  background-color: #f0f0f0;
  border: 1.5px solid #e0e0e0;
}

/* Candado — esquina inferior izquierda */
.post-card__lock {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.post-card__lock-icon {
  width: 16px;
  height: 16px;
  color: #fff;
}

/* Card locked — sin imagen usa fondo gris claro */
.post-card--locked .post-card__link:not([style]) {
  background-color: #f5f5f5;
}

/* Título sobre la imagen */
.post-card__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 20px;
  z-index: 2;
}

.post-card__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin: 0;
}

/* Posts sin imagen — título en negro */
.post-card--locked .post-card__link:not([style]) .post-card__title,
.post-card__link:not([style]) .post-card__title {
  color: #1a1a1a;
}

/* Botón "More" centrado debajo del grid */
.magnet-posts-grid__footer {
  margin-top: 48px;
  text-align: center;
}

.magnet-posts-grid__btn {
  display: inline-block;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  padding: 10px 60px;
  background-color: #dc2327;
  color: #ffffff;
  border-radius: 100px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.magnet-posts-grid__btn:hover,
.magnet-posts-grid__btn:focus {
  opacity: 0.85;
  color: #ffffff;
}

.magnet-posts-grid__empty {
  text-align: center;
  color: #999;
  padding: 40px 0;
}

/* Responsive */
@media (max-width: 900px) {
  .magnet-posts-grid__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .magnet-posts-grid__grid {
    grid-template-columns: 1fr;
  }
  .magnet-posts-grid {
    padding: 48px 0;
  }
}
