/* ═══════════════════════════════════════════════════════════════════
   PHOCADOWNLOAD RESKIN — Lasalle Lwanga
   Restyles the PhocaDownload extension's Bootstrap-based markup to
   match the rest of the site (navy #0a2357 / blue #124b98 /
   gold #fd9f01, Playfair Display + Inter), WITHOUT touching any of
   the extension's own PHP files. It generates its own HTML using its
   own CSS classes — this file simply re-skins those existing classes,
   which is much lower-risk than replacing PhocaDownload's rendering
   logic (rights checks, previews, mirror links, ratings, etc.) with
   custom template overrides that couldn't be tested against the live
   database and file library.
   ═══════════════════════════════════════════════════════════════════ */

#phoca-dl-categories-box,
#phoca-dl-category-box,
#phoca-dl-file-box {
  font-family: 'Inter', sans-serif;
  background: #fbfaf7;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 72px;
  color: #333;
}

/* Headings */
#phoca-dl-categories-box h1,
#phoca-dl-category-box h1,
#phoca-dl-file-box h1,
.pd-ctitle,
#phoca-dl-categories-box h3,
#phoca-dl-category-box h3,
#phoca-dl-file-box h3 {
  font-family: 'Playfair Display', serif !important;
  color: #0a2357 !important;
  font-weight: 700 !important;
}
.pd-ctitle { font-size: 26px !important; margin-bottom: 18px !important; }

/* Description text */
.pd-desc, .pd-cdesc {
  font-size: 15px;
  color: #555;
  line-height: 1.75;
  margin-bottom: 24px;
}

/* "Back" button at the top of a category/file page */
.ph-top .btn-primary,
.ph-top a.btn {
  background: #f4f7fd !important;
  border: 1.5px solid #e0dfd9 !important;
  color: #124b98 !important;
  font-weight: 700 !important;
  border-radius: 30px !important;
  padding: 8px 20px !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
.ph-top .btn-primary:hover { background: #124b98 !important; color: #fff !important; }

/* Category cards (the "Newsletters / Gazette / ..." grid) */
#phoca-dl-categories-box .card {
  border: 1px solid #e5eaf5 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 12px rgba(18, 75, 152, .06) !important;
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
#phoca-dl-categories-box .card:hover {
  box-shadow: 0 10px 28px rgba(18, 75, 152, .14) !important;
  transform: translateY(-3px);
}
#phoca-dl-categories-box .card-title {
  font-family: 'Playfair Display', serif !important;
  font-size: 18px !important;
}
#phoca-dl-categories-box .card-title a {
  color: #0a2357 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
#phoca-dl-categories-box .card-title a:hover { color: #124b98 !important; text-decoration: underline !important; }
#phoca-dl-categories-box .card-text { color: #666 !important; font-size: 14px; }
#phoca-dl-categories-box .card-footer {
  background: #f4f7fd !important;
  border-top: 1px solid #e5eaf5 !important;
}
.pd-categories-number, .pd-files-number { color: #124b98 !important; font-weight: 600; }

/* Sub-category / year list inside a category card or page */
.pd-subcategory a,
.list-group-item a {
  color: #124b98 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.pd-subcategory a:hover, .list-group-item a:hover { text-decoration: underline !important; color: #fd9f01 !important; }
.list-group-item {
  border-color: #e6e4dc !important;
  background: transparent !important;
}
.pd-subcategory { padding: 10px 0; border-bottom: 1px dotted #e6e4dc; }

/* Individual file rows */
.pd-title { color: #0a2357 !important; font-weight: 700 !important; font-family: 'Inter', sans-serif !important; }
.pd-filename a, .pd-filenamebox a, .pd-filenamebox-bt a {
  color: #124b98 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.pd-filename a:hover, .pd-filenamebox a:hover, .pd-filenamebox-bt a:hover { color: #fd9f01 !important; text-decoration: underline !important; }

/* Action buttons: Download / Details / Preview / Play */
.pd-button-box-bt .btn, .pd-buttons .btn {
  border-radius: 24px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 8px 18px !important;
  border: none !important;
  box-shadow: none !important;
}
.btn-success { background: #fd9f01 !important; color: #0a2357 !important; }
.btn-success:hover { background: #ffc444 !important; color: #0a2357 !important; }
.btn-info { background: #124b98 !important; color: #fff !important; }
.btn-info:hover { background: #0a2357 !important; }
.btn-warning { background: #f4f7fd !important; color: #124b98 !important; border: 1.5px solid #e0dfd9 !important; }
.btn-warning:hover { background: #eaf0fb !important; }
.btn-danger { background: #8a2c47 !important; color: #fff !important; }
.btn-danger:hover { background: #6d2039 !important; }

/* Horizontal rules between sections */
.pd-hr, .pd-hr-cb { border-top: 1px solid #e6e4dc !important; margin: 24px 0 !important; }

/* Most-downloaded / most-viewed file list */
#phoca-dl-most-viewed-box h3 { font-size: 18px !important; margin-bottom: 12px !important; }
.pd-documents .pd-filename a { font-size: 14px; }

/* Pagination */
.pd-pagination .pagination .page-link {
  color: #124b98 !important;
  border-color: #e5eaf5 !important;
}
.pd-pagination .pagination .active .page-link {
  background: #124b98 !important;
  border-color: #124b98 !important;
  color: #fff !important;
}

@media (max-width: 640px) {
  #phoca-dl-categories-box, #phoca-dl-category-box, #phoca-dl-file-box { padding: 28px 16px 56px; }
}
