/* ============================================================
   Postcards — the three edits (postcards.html) and each edit's
   postcard grid (postcards-<edit>.html, generated by tools/build_postcards.py)
   ============================================================ */

.pc-hint { margin-top: 14px; color: var(--rose-deep); }
.pc-main { padding-top: 10px; }

/* ---------- three jharokha windows ---------- */

.edits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }

.edit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1.5px solid rgba(194, 161, 94, 0.5);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.edit-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.edit-card:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 4px; }

/* the whole postcard, uncropped, in a plain rectangular frame */
.edit-window {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(74, 50, 44, 0.14);
  background: var(--lavender);
}
.edit-window img { display: block; width: 100%; height: auto; transition: transform 0.6s var(--ease); }
.edit-card:hover .edit-window img { transform: scale(1.03); }

.edit-card h3 { font-size: 1.45rem; margin-top: 20px; }
.edit-count {
  margin-top: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--rose-deep);
}
.edit-count .arr { display: inline-block; transition: transform 0.3s var(--ease); }
.edit-card:hover .edit-count .arr { transform: translateX(5px); }

/* ---------- an edit's postcards: 3 columns, as many rows as needed ---------- */

.pc-hero { padding-bottom: 30px; }

.pc-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pc-item figure {
  margin: 0;
  background: var(--surface);
  border: 1.5px solid rgba(194, 161, 94, 0.45);
  border-radius: 12px;
  padding: 14px 14px 10px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.pc-item figure:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: var(--shadow-hover); }
/* every card has the same frame; landscape postcards sit centred inside it, uncropped */
.pc-img { aspect-ratio: 4 / 5; display: grid; place-items: center; }
.pc-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 4px 12px rgba(74, 50, 44, 0.12); }
.pc-item figcaption {
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--ink-soft);
  padding-top: 8px;
}

.pc-back { text-align: center; margin-top: 50px; }

@media (max-width: 900px) {
  .edits { gap: 20px; }
  .edit-card { padding: 18px 16px 22px; }
  .pc-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 640px) {
  .edits { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
  .pc-grid { gap: 12px; }
  .pc-item figure { padding: 8px 8px 4px; }
  .pc-item figcaption { font-size: 1rem; }
}
