/* =========================================================
   Free Download Gallery – download.css
   Fail-safe Etsy style hover zoom (JS sets transform)
   ========================================================= */

/* ---------- Grid layout ---------- */
.download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ---------- Individual card ---------- */
.download-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    text-align: left;                     /* changed from center to left */
    position: relative;
    overflow: hidden;                     /* clip zoomed image */
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    transition: box-shadow .3s;
}
.download-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

/* ---------- Image container ---------- */
.image-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;                      /* desktop cue */
}
.image-container img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;       /* JS updates transform */
    will-change: transform;
    border-radius: 8px;                   /* added for rounded corners */
}

/* ---------- Title & download link ---------- */
.download-card h4 {
    margin: 12px 0 6px;
    font-size: 18px;
}
.download-link,
.download-link:visited {
    display: inline-block;
    font-weight: 600;
    font-size: 15px;
    color: #00008b;
    text-decoration: none;
    margin-top: 4px;
    transition: color .2s;
}
.download-link:hover {
    color: #0000ff;
    text-decoration: underline;
}

/* ---------- Responsive breakpoints ---------- */
@media (max-width: 1024px) {               /* large tablets */
    .download-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {                /* small tablets / phones */
    .download-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {                /* portrait phones */
    .download-grid { grid-template-columns: 1fr; }
}

/* ===== Download page extensions ===== */
/* show category tag after link using data-category attribute */
.download-card[data-category]::after {
    content: attr(data-category);
    display: inline-block;
    margin-left: 4px;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1.2;
    color: #555;
    background: #f2f2f2;
    border-radius: 4px;
    vertical-align: middle;
}

/* ---------- Row alignment helpers (desktop: 4 cols) ---------- */
/* One card centered (spans cols 2–3) */
.download-grid.align-1 .download-card:nth-child(1) {
  grid-column: 2 / span 2;
}

/* Two cards centered (sit in cols 2 and 3) */
.download-grid.align-2 .download-card:nth-child(1) { grid-column: 2; }
.download-grid.align-2 .download-card:nth-child(2) { grid-column: 3; }

/* Three cards centered (cols 2–4) */
.download-grid.align-3 .download-card:nth-child(1) { grid-column: 2; }

/* Clear explicit placement on smaller breakpoints so items flow naturally */
@media (max-width: 1024px) {
  .download-grid.align-1 .download-card:nth-child(1),
  .download-grid.align-2 .download-card:nth-child(1),
  .download-grid.align-2 .download-card:nth-child(2),
  .download-grid.align-3 .download-card:nth-child(1) {
    grid-column: auto;
  }

/*
One image in the row:
<div class="grid-item span-4">
  <div class="download-grid align-1">
    <!-- 1 card -->
  </div>
</div>
Two images in the row:
<div class="grid-item span-4">
  <div class="download-grid align-2">
    <!-- 2 cards -->
  </div>
</div>
Three images in the row:
<div class="grid-item span-4">
  <div class="download-grid align-3">
    <!-- 3 cards -->
  </div>
</div>
Four images in the row:
<div class="grid-item span-4">
  <div class="download-grid">
    <!-- 4 cards -->
  </div>
</div>
Usage in HTML:
One image in the row: <div class="download-grid align-1">…1 card…</div>
Two images in the row: <div class="download-grid align-2">…2 cards…</div>
Three images in the row: <div class="download-grid align-3">…3 cards…</div>
Four images in the row: <div class="download-grid">…4 cards…</div>
*/
/* optional hidden long description block; enable if needed
.download-card .long-desc {
    display: none;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.3;
    color: #444;
}
.download-card.show-desc .long-desc { display: block; }
*/
