/* campaign detail */

.campaign-head { margin-bottom: 30px; }
.campaign-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 14px 0 12px;
  max-width: 820px;
}
.campaign-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  flex-wrap: wrap;
}
.campaign-meta strong { color: var(--text); }

.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.6; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 700;
}
.avatar-sm { width: 30px; height: 30px; font-size: 0.85rem; }

.campaign-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  align-items: start;
}

/* gallery */
.gallery { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.gallery-main { aspect-ratio: 16 / 9; background: var(--surface-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex;
  gap: 10px;
  padding: 12px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
}
.gallery-thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  padding: 0;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--accent); }
.gallery-fallback {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--accent) 55%, var(--muted));
  background: linear-gradient(135deg, var(--surface-2), var(--bg-alt));
}

/* campaign sections */
.campaign-section { margin-top: 38px; }
.campaign-section-title {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.campaign-description { color: var(--text); white-space: pre-wrap; line-height: 1.75; font-size: 0.99rem; }

/* progress posts */
.progress-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.progress-post-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.progress-post-head h3 { font-size: 1.05rem; }
.progress-post-date { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.progress-post-text { color: var(--muted); font-size: 0.94rem; white-space: pre-wrap; }
.progress-images { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.progress-img {
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}
.progress-img img {
  width: 140px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.progress-img:hover img { transform: scale(1.04); border-color: var(--accent); }

/* progress image modal (lightbox) */
body.modal-open { overflow: hidden; }

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.image-modal[hidden] { display: none; }
.image-modal.open { opacity: 1; visibility: visible; }

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.image-modal-box {
  position: relative;
  max-width: min(92vw, 1300px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.96);
  transition: transform 0.18s ease;
}
.image-modal.open .image-modal-box { transform: scale(1); }

.image-modal-box img {
  max-width: min(92vw, 1300px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px -20px rgba(0, 0, 0, 0.7);
  background: var(--surface);
}

.image-modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.image-modal-close:hover { background: rgba(255, 255, 255, 0.3); }

@media (max-width: 640px) {
  .image-modal-close { top: 8px; right: 8px; background: rgba(0, 0, 0, 0.45); }
}

/* donations */
.donation-list { list-style: none; }
.donation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
}
.donation-row:last-child { border-bottom: none; }
.donation-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 auto;
}
.donation-name { font-weight: 600; font-size: 0.93rem; }
.donation-date { color: var(--muted); font-size: 0.82rem; margin-left: auto; }
.donation-amount { font-weight: 800; }
.donation-check  { line-height: 1rem; align-items: center; }
.donation-pending { color: var(--muted) }
.donation-totals { border-top: 1px solid var(--border); text-align: right; }
.donation-totals li { display: flex; justify-content: flex-end; align-items: center; list-style: none; padding: 13px 4px 0; }
.donation-totals li svg { margin-left: 12px; }
.donation-total { margin-right: 12px; color: var(--muted); font-size: 0.9rem; font-weight: bold; }

/* sidebar */
.campaign-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + 18px); }
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.side-card-title { font-size: 1.02rem; margin-bottom: 10px; }
.side-info {
  margin-bottom: 12px;
  text-align: right;
  color: var(--muted);
  font-size: 0.8rem;
/*  border-bottom: 1px solid var(--border);*/
}
.side-raised { margin-bottom: 4px; }
.side-raised-value { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.side-raised-label { color: var(--muted); font-size: 0.88rem; }
.track-lg { height: 12px; margin: 14px 0 16px; }
.side-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.side-meta strong { color: var(--text); }
.side-note { color: var(--muted); font-size: 0.87rem; margin: 12px 0; }
.side-card .btn-block { margin-bottom: 10px; }

.bank-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.bank-list div { display: flex; justify-content: space-between; gap: 12px; /*border-bottom: 1px dashed var(--border); padding-bottom: 8px;*/ }
.bank-list div:last-child { border-bottom: none; padding-bottom: 0; }
.bank-list dt { color: var(--muted); font-size: 0.86rem; }
.bank-list dd { font-weight: 600; font-size: 0.92rem; text-align: right; word-break: break-word; }
.bank-list.inline { flex-direction: row; flex-wrap: wrap; gap: 18px; }
.bank-list.inline div { border-bottom: none; padding-bottom: 0; flex-direction: column; gap: 2px; }
.bank-list.inline dd { text-align: left; }

/* payment method sections */
.side-pay-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin: 16px 0 4px;
}
.side-pay-title + .side-note { margin-top: 6px; }
.side-pay-title i { font-weight: normal; text-transform: initial; }

.donate-form-card { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

@media (max-width: 960px) {
  .donation-date { visibility: hidden; }
  .campaign-layout { grid-template-columns: 1fr; }
  .campaign-side { position: static; }
}
