/* /assets/css/amp-grid.css
   =========================================================
   Amp Grid Block (no background color)
   ========================================================= */

.mag-amp-grid {
  padding: 5rem 0;
  color: #ffffff;
}

/* Header row (mirrors mag-collection header) */
.mag-amp-grid__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center; /* center whole header group */
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: center;      /* center title/copy */
}

.mag-amp-grid__header-left {
  text-align: center;
}

.mag-amp-grid__title {
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.mag-amp-grid__copy {
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto; /* center copy block */
}

/* CTA */
.mag-amp-grid__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid #ffffff;
  border-radius: 8px;
  font-weight: 500;
  color: #ffffff;
  background-color: transparent;
  text-transform: none;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.mag-amp-grid__cta:hover {
  background-color: #ffffff;
  color: #1f1d1b;
  text-decoration: none;
}

/* Card */
.mag-amp-grid__card {
  height: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 1.6rem 1.8rem 1.8rem;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, opacity .35s ease;
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}

.mag-amp-grid__card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: var(--amp-delay, 0ms);
}

.mag-amp-grid__card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 26px rgba(0,0,0,.65);
  border-color: rgba(255,255,255,0.28);
}

.mag-amp-grid__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Image (square transparent PNG-friendly) */
.mag-amp-grid__img-wrap {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: transparent; /* IMPORTANT: no black box behind transparent PNGs */
}

.mag-amp-grid__img {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* transparent PNGs look best */
  display: block;
}

.mag-amp-grid__img--placeholder {
  object-fit: cover;         /* FPO can fill */
}

/* Name */
.mag-amp-grid__name {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-align: center; /* center card title */
}

/* Empty */
.mag-amp-grid__empty {
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  color: rgba(255,255,255,0.85);
}

@media (max-width: 1399.98px) {
  .mag-amp-grid__title {
    font-size: 1.68rem;
  }

  .mag-amp-grid__copy {
    font-size: 1.01rem
  }
}

@media (max-width: 1199.98px) {
  .mag-amp-grid__title {
    font-size: 1.55rem;
  }

  .mag-amp-grid__copy {
    max-width: 500px;
    font-size: 0.99rem;
    line-height: 1.65;
  }

  .mag-amp-grid__name {
    font-size: 0.9rem;
  }
}

/* Responsive */
@media (max-width: 991.98px) {
  .mag-amp-grid { padding: 4rem 0; }
  .mag-amp-grid__header { flex-direction: column; align-items: center; text-align: center; }
  .mag-amp-grid__copy { max-width: none; }
  .mag-amp-grid__cta { white-space: normal; text-align: center; }
}

@media (max-width: 575.98px) {
  .mag-amp-grid__header { align-items: center; text-align: center; }
  .mag-amp-grid__copy { text-align: center; }
  .mag-amp-grid__cta { align-self: center; width: 100%; }
  .mag-amp-grid__card { padding: 1.4rem 1.4rem 1.6rem; }
}
