/**
 * Gutenberg PDF Downloader — Frontend Styles
 * Responsive 2-column grid, collapsing to 1 column on mobile.
 */

/* ── Grid container ──────────────────────────────────────────────────────── */
.gpd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 0;
  list-style: none;
}

@media (max-width: 600px) {
  .gpd-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Empty-state message */
.gpd-empty {
  text-align: center;
  color: #666;
  font-style: italic;
}

/* ── Individual card ─────────────────────────────────────────────────────── */
.gpd-grid .pdb-wrap {
  width: 100%;
  border: 2px solid #efefef;
  border-radius: 20px;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gpd-grid .pdb-wrap:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

/* ── Thumbnail section ───────────────────────────────────────────────────── */
.gpd-grid .pdf-part {
  line-height: 0; /* removes the inline gap below the image */
}

.gpd-grid .pdf-part a {
  display: block;
  overflow: hidden;
}

.gpd-grid .pdf-part img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

.gpd-grid .pdf-part a:hover img {
  opacity: 0.92;
  transform: scale(1.02);
}

/* Fallback placeholder if no image */
.gpd-no-thumb {
  width: 100%;
  height: 220px;
  background: #f0f0f0;
}

/* ── Title & description section ─────────────────────────────────────────── */
.gpd-grid .content-part {
  padding: 20px;
  text-align: center;
  flex: 1; /* push CTA to the bottom regardless of description length */
}

.gpd-grid .content-part h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 700;
}

.gpd-grid .content-part h3 a {
  text-decoration: none;
  color: inherit;
}

.gpd-grid .content-part h3 a:hover {
  text-decoration: underline;
}

.gpd-grid .content-part p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #555;
}

/* ── Download CTA section ────────────────────────────────────────────────── */
.gpd-grid .cta-part {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.gpd-grid .pdf-download-btn {
  display: block;
  text-decoration: none;
  background: #006590;
  color: #fff;
  padding: 16px 20px;
  width: 100%;
  text-align: center;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.gpd-grid .pdf-download-btn:hover {
  background: #004e72;
  color: #fff;
}

.gpd-grid .pdf-download-btn:active {
  transform: scale(0.97);
}
