/* ═══════════════════════════════════════════════════════════════════════════
   HAFT Uganda — Reports (repurposed Events) styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Banner ────────────────────────────────────────────────────────────── */
.haft-reports-banner-section .banner-bg-wrap {
  background: linear-gradient(135deg,
    #13294b 0%,
    #1e3f70 60%,
    #0d1f3c 100%) !important;
  border-radius: 0 0 50px 50px;
  position: relative;
  overflow: hidden;
}

.haft-reports-banner-section .banner-bg-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(255,164,21,.07) 0%, transparent 60%);
  pointer-events: none;
}

.haft-reports-banner-section .banner-title,
.haft-reports-banner-section .banner-subtitle {
  color: #fff !important;
  opacity: 1 !important;
}

.haft-reports-banner-section .banner-subtitle {
  color: var(--color--secondary-color, #ffa415) !important;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  font-weight: 700;
}

.haft-reports-banner-lede {
  font-family: Manrope, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,.78);
  max-width: 580px;
  margin-top: .75rem;
}

/* ─── Section wrapper ───────────────────────────────────────────────────── */
.haft-reports-section {
  padding: 4rem 0 5rem;
}

/* ─── Archive header row ────────────────────────────────────────────────── */
.haft-reports-archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #eef0f3;
}

.haft-reports-archive-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: Manrope, sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #13294b;
}

.haft-reports-count {
  font-family: Manrope, sans-serif;
  font-size: .85rem;
  color: #8a94a6;
  margin: 0;
}

/* ─── Reports grid ──────────────────────────────────────────────────────── */
.haft-reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
}

/* ─── Report card ───────────────────────────────────────────────────────── */
.haft-report-card {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 16px;
  padding: 1.75rem 1.75rem 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  position: relative;
}

.haft-report-card:hover,
.haft-report-card:focus-within {
  border-color: #13294b;
  box-shadow: 0 8px 28px rgba(19,41,75,.1);
  transform: translateY(-3px);
  outline: none;
}

/* Date badge */
.haft-report-date-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 52px;
  background: linear-gradient(160deg, #13294b 0%, #1e3f70 100%);
  border-radius: 10px;
  padding: .45rem .25rem .35rem;
  text-align: center;
  color: #fff;
  flex-shrink: 0;
}

.haft-report-date-day {
  display: block;
  font-family: Nunito, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.haft-report-date-month {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #ffa415;
  margin-top: .1rem;
}

.haft-report-date-year {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: .6rem;
  color: rgba(255,255,255,.65);
  margin-top: .05rem;
}

/* Card body */
.haft-report-card-body {
  flex: 1;
  padding-right: 64px; /* room for date badge */
}

.haft-report-card-top {
  margin-bottom: .6rem;
}

.haft-report-type-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: Manrope, sans-serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--color--secondary-color, #ffa415);
}

.haft-report-type-chip svg {
  color: var(--color--secondary-color, #ffa415);
}

.haft-report-card-title {
  font-family: Nunito, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #13294b;
  line-height: 1.35;
  margin: 0 0 .75rem;
}

.haft-report-card-title a {
  color: inherit;
  text-decoration: none;
}

.haft-report-card-title a:hover {
  color: var(--color--secondary-color, #ffa415);
}

/* Meta row */
.haft-report-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .85rem;
  margin-bottom: .75rem;
}

.haft-report-meta-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: Manrope, sans-serif;
  font-size: .8rem;
  color: #5a6070;
  font-weight: 500;
}

.haft-report-topics-line {
  font-family: Manrope, sans-serif;
  font-size: .85rem;
  color: #3d4f5c;
  line-height: 1.5;
  margin: 0 0 .4rem;
}

.haft-report-prepared-by {
  font-family: Manrope, sans-serif;
  font-size: .78rem;
  color: #8a94a6;
  margin: 0;
}

/* Card footer CTA */
.haft-report-card-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef0f3;
}

.haft-report-read-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: Manrope, sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: #13294b;
  text-decoration: none;
  transition: color .18s ease, gap .18s ease;
}

.haft-report-read-link:hover {
  color: var(--color--secondary-color, #ffa415);
  gap: .65rem;
}

/* Empty state */
.haft-reports-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: #8a94a6;
}

.haft-reports-empty svg {
  margin: 0 auto 1rem;
  display: block;
  color: #d1d5db;
}

/* Pagination */
.haft-reports-pagination {
  margin-top: 3rem;
  justify-content: center;
}

/* ─── Report Detail ──────────────────────────────────────────────────────── */

/* Back bar */
.haft-report-back-bar {
  background: #f8f9fb;
  border-bottom: 1px solid #e5e9f0;
  padding: .85rem 0;
}

.haft-report-back-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.haft-report-back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: Manrope, sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: #13294b;
  text-decoration: none;
  transition: color .18s ease;
}

.haft-report-back-link:hover {
  color: var(--color--secondary-color, #ffa415);
}

.haft-report-ref-chip {
  font-family: 'Courier New', monospace;
  font-size: .75rem;
  color: #8a94a6;
  background: #eef0f3;
  border-radius: 6px;
  padding: .2rem .55rem;
  letter-spacing: .04em;
}

/* Section */
.haft-report-doc-section {
  padding: 3.5rem 0 5rem;
  background: #f8f9fb;
  min-height: 60vh;
}

/* Document card */
.haft-report-document {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(19,41,75,.07);
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
}

/* Letterhead */
.haft-report-letterhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.25rem 2.5rem 1.75rem;
  background: linear-gradient(135deg, #13294b 0%, #1e3f70 100%);
}

.haft-report-letterhead-logo-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.haft-report-letterhead-icon {
  flex-shrink: 0;
}

.haft-report-org-name {
  font-family: Nunito, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .2rem;
  line-height: 1.2;
}

.haft-report-org-tagline {
  font-family: Manrope, sans-serif;
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  margin: 0;
}

.haft-report-doc-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: Manrope, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffa415;
  background: rgba(255,164,21,.12);
  border: 1px solid rgba(255,164,21,.3);
  border-radius: 8px;
  padding: .35rem .75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Letterhead rule */
.haft-report-letterhead-rule {
  height: 4px;
  background: linear-gradient(90deg, #ffa415 0%, #fcd97a 60%, #13294b 100%);
}

/* Title block */
.haft-report-title-block {
  padding: 2rem 2.5rem 1.25rem;
  border-bottom: 1px solid #eef0f3;
}

.haft-report-title {
  font-family: Nunito, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #13294b;
  line-height: 1.25;
  margin: 0 0 .4rem;
}

.haft-report-subtitle-date {
  font-family: Manrope, sans-serif;
  font-size: .9rem;
  color: #8a94a6;
  margin: 0;
}

/* Metadata table */
.haft-report-meta-table-wrap {
  padding: 1.5rem 2.5rem;
  background: #f8f9fb;
  border-bottom: 1px solid #eef0f3;
}

.haft-report-meta-table {
  width: 100%;
  border-collapse: collapse;
}

.haft-report-meta-table th {
  width: 200px;
  padding: .55rem .75rem .55rem 0;
  font-family: Manrope, sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a94a6;
  vertical-align: top;
  white-space: nowrap;
  border-bottom: 1px solid #e5e9f0;
  text-align: left;
}

.haft-report-meta-table td {
  padding: .55rem 0;
  font-family: Manrope, sans-serif;
  font-size: .9rem;
  color: #1e2e3b;
  vertical-align: top;
  border-bottom: 1px solid #e5e9f0;
}

.haft-report-meta-table tr:last-child th,
.haft-report-meta-table tr:last-child td {
  border-bottom: none;
}

.haft-report-meta-time {
  color: #8a94a6;
  font-size: .85rem;
}

/* Section headings */
.haft-report-section-heading {
  font-family: Nunito, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #13294b;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 0 0 .85rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #ffa415;
  display: inline-block;
}

/* Summary block */
.haft-report-summary-block {
  padding: 1.75rem 2.5rem;
  border-bottom: 1px solid #eef0f3;
}

.haft-report-summary-text {
  font-family: Manrope, sans-serif;
  font-size: .95rem;
  line-height: 1.75;
  color: #3d4f5c;
  margin: 0;
}

/* Body block */
.haft-report-body-block {
  padding: 1.75rem 2.5rem;
  border-bottom: 1px solid #eef0f3;
}

.haft-report-body.ck-content {
  font-family: Manrope, sans-serif;
  font-size: .95rem;
  line-height: 1.75;
  color: #3d4f5c;
}

.haft-report-body.ck-content h2,
.haft-report-body.ck-content h3 {
  font-family: Nunito, sans-serif;
  color: #13294b;
  margin-top: 1.5rem;
}

.haft-report-topics-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.haft-report-topics-list li {
  font-family: Manrope, sans-serif;
  font-size: .9rem;
  color: #3d4f5c;
  padding: .45rem .75rem;
  background: #f0f4f8;
  border-radius: 8px;
  border-left: 3px solid #ffa415;
}

/* Document footer */
.haft-report-doc-footer {
  padding: 1.5rem 2.5rem 1.75rem;
  background: #f8f9fb;
}

.haft-report-doc-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.haft-report-doc-footer-prepared,
.haft-report-doc-footer-submitted {
  font-family: Manrope, sans-serif;
  font-size: .82rem;
  color: #5a6070;
  margin: 0 0 .2rem;
}

.haft-report-doc-footer-ref {
  font-family: 'Courier New', monospace;
  font-size: .78rem;
  color: #8a94a6;
  margin: 0 0 .2rem;
  text-align: right;
}

.haft-report-doc-footer-org {
  font-family: Manrope, sans-serif;
  font-size: .78rem;
  color: #b0b8c6;
  margin: 0;
  text-align: right;
}

.haft-report-doc-footer-rule {
  height: 1px;
  background: #e5e9f0;
  margin-bottom: 1.1rem;
}

.haft-report-back-bottom-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: Manrope, sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: #13294b;
  text-decoration: none;
  transition: color .18s ease;
}

.haft-report-back-bottom-link:hover {
  color: var(--color--secondary-color, #ffa415);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .haft-reports-grid {
    grid-template-columns: 1fr;
  }

  .haft-report-letterhead {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .haft-report-title-block,
  .haft-report-meta-table-wrap,
  .haft-report-summary-block,
  .haft-report-body-block,
  .haft-report-doc-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .haft-report-meta-table th {
    width: 120px;
    font-size: .72rem;
  }

  .haft-report-doc-footer-inner {
    flex-direction: column;
    gap: .75rem;
  }

  .haft-report-doc-footer-ref,
  .haft-report-doc-footer-org {
    text-align: left;
  }

  .haft-report-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 479px) {
  .haft-report-card-body {
    padding-right: 0;
  }

  .haft-report-date-badge {
    position: static;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .55rem;
    border-radius: 8px;
    margin-bottom: .85rem;
  }

  .haft-report-date-day {
    font-size: 1rem;
  }

  .haft-report-meta-table th {
    display: none;
  }

  .haft-report-meta-table td {
    padding-left: 0;
  }
}


/* ═══ Card Image Support ══════════════════════════════════════════════════ */

/* Card with image: remove top padding so image bleeds to edges */
.haft-report-card.has-image {
  padding-top: 0;
}

/* Image wrapper — bleeds to card edges via negative side margins */
.haft-report-card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  margin: 0 -1.75rem 1.25rem;
}

/* The image itself */
.haft-report-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.haft-report-card:hover .haft-report-card-img,
.haft-report-card:focus-within .haft-report-card-img {
  transform: scale(1.05);
}

/* Gradient overlay so date badge is always readable on any photo */
.haft-report-card-img-wrap::after {
  content: \\'\\';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 45%,
    rgba(13, 23, 45, 0.55) 100%);
  pointer-events: none;
}

/* Date badge repositioned to bottom-right of image */
.haft-report-card-img-wrap .haft-report-date-badge {
  position: absolute;
  bottom: 0.9rem;
  right: 0.9rem;
  top: auto;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Card body when image present — no extra right-padding for badge (badge on image) */
.haft-report-card.has-image .haft-report-card-body {
  padding-right: 0;
}

/* Responsive: on mobile, image still shows correctly */
@media (max-width: 479px) {
  .haft-report-card-img-wrap {
    margin: 0 -1.25rem 1rem;
    border-radius: 12px 12px 0 0;
  }
}

/* Report Detail Hero */
.haft-report-hero { position: relative; width: 100%; max-height: 480px; overflow: hidden; background: #0d1729; }
.haft-report-hero-img { width: 100%; height: 100%; max-height: 480px; object-fit: cover; display: block; opacity: 0.82; }
.haft-report-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13,23,45,0.15) 0%, rgba(13,23,45,0.72) 100%); display: flex; align-items: flex-end; }
.haft-report-hero-inner { padding-bottom: 2rem; padding-top: 1rem; }
.haft-report-hero-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-family: Manrope,sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #ffa415; background: rgba(255,164,21,0.15); border: 1px solid rgba(255,164,21,0.4); border-radius: 6px; padding: 0.3rem 0.65rem; margin-bottom: 0.6rem; }
.haft-report-hero-title { font-family: Nunito,sans-serif; font-size: clamp(1.3rem,3vw,2rem); font-weight: 800; color: #fff; line-height: 1.2; margin: 0 0 0.4rem; max-width: 760px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.haft-report-hero-date { font-family: Manrope,sans-serif; font-size: 0.9rem; color: rgba(255,255,255,0.75); margin: 0; }
@media (max-width: 767px) { .haft-report-hero { max-height: 300px; } .haft-report-hero-img { max-height: 300px; } .haft-report-hero-title { font-size: 1.2rem; } .haft-report-hero-inner { padding-bottom: 1.25rem; } }

/* ── Blog card no-image fallback (v2) ────────────────────── */
.blog-post-image-link.blog-post-no-image {
    display: block;
    width: 100%;
    height: 210px;
    position: relative;
    background: linear-gradient(145deg, #1a3a2e 0%, #2d6a4f 55%, #52b788 100%);
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    text-decoration: none;
}
.blog-post-image-link.blog-post-no-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 70% 30%, rgba(116,198,157,0.25) 0%, transparent 60%);
}

/* ── Blog card excerpt ───────────────────────────────────── */
.blog-post-excerpt {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #5a6270;
    margin: 0.35rem 0 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}