/* =========================
   Download UI (common)
   ========================= */

/* ---- basic ---- */
.download-cards,
.dl-all,
.dl-selected,
.download-detail {
  box-sizing: border-box;
}

.download-cards *,
.dl-all *,
.dl-selected *,
.download-detail * {
  box-sizing: inherit;
}

/* ---- cards grid (download_cards) ---- */
.download-cards--grid {
  display: grid;
  gap: 16px;
  padding:2em 0;
}

.download-cards--grid[data-columns="1"] { grid-template-columns: 1fr; }
.download-cards--grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.download-cards--grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.download-cards--grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.download-cards--grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.download-cards--grid[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 960px) {
  .download-cards--grid[data-columns="4"],
  .download-cards--grid[data-columns="5"],
  .download-cards--grid[data-columns="6"] {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 720px) {
  .download-cards--grid,
  .download-cards--grid[data-columns="2"],
  .download-cards--grid[data-columns="3"] {
    grid-template-columns: 1fr;
  }
}

/* ---- card base ---- */
.download-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.download-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.download-card__thumbWrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
  overflow: hidden;
}

.download-card__thumbWrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.download-card__title {
  font-size: 16px;
  line-height: 1.4;
  padding: 12px 14px 0;
  margin: 0;
}

.download-card__excerpt {
  padding: 8px 14px 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  flex: 1;
}

/* ---- card actions ---- */
.download-card__actions {
  display: flex;
  gap: 10px;
  padding: 14px;
  margin-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.download-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #d1d5db;
  color: #111827;
  background: #fff;
  width: 50%;
}

.download-card__btn--form {
  border-color: #111827;
}

.download-card__btn:hover {
  opacity: 0.85;
}

/* empty text */
.download-cards__empty {
  margin: 16px 0;
  color: #6b7280;
}

/* =========================
   download archive
   ========================= */
.download-archive{
	max-width: 1100px;
	margin:0 auto;
}

/* =========================
   Form-side selected (dl_selected)
   ========================= */
.dl-selected {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  margin-bottom: 16px;
}

.dl-selected__thumb img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.dl-selected__title {
  margin: 12px 0 6px;
  font-size: 18px;
}

.dl-selected__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
}

/* =========================
   Token all downloads (dl_all_cards)
   ========================= */
.dl-all__title {
  margin: 0 0 14px;
  font-size: 22px;
}

.dl-all__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 960px) {
  .dl-all__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .dl-all__grid { grid-template-columns: 1fr; }
}

.dl-all__card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dl-all__thumbLink {
  display: block;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
}

.dl-all__thumbLink img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dl-all__name {
  margin: 0;
  padding: 12px 14px 0;
  font-size: 16px;
  line-height: 1.4;
}
.dl-all__name a {
  text-decoration: none;
  color: inherit;
}

.dl-all__actions {
  display: flex;
  gap: 10px;
  padding: 14px;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
}
.dl-all__btn {
  width: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #d1d5db;
  color: #111827;
  background: #fff;
}
.dl-all__btn:hover {
  opacity: 0.85;
}
.dl-all__btn--detail {
  border-color: #111827;
}

/* =========================
   Single detail (single-download.php)
   ========================= */
.download-detail__header {
  margin-bottom: 14px;
}
.download-detail__title {
  font-size: 26px;
  line-height: 1.3;
  margin: 0;
}

.download-detail__media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.download-detail__lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: #374151;
}

.download-detail__content {
  margin-top: 18px;
  line-height: 1.9;
}

.download-detail__actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 720px) {
  .download-detail__actions { flex-direction: column; }
}

.download-detail__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #d1d5db;
  color: #111827;
  background: #fff;
}

.download-detail__btn--form {
  border-color: #111827;
}

.download-detail__btn:hover {
  opacity: 0.85;
}