/*
  ============================================================================
  File: donation.css
  Deskripsi: Style khusus untuk halaman donasi
  Author: Aria Rahman
  Versi: 1.0.0
  ============================================================================
*/

/* ============ PAGE HERO ============ */
.page-hero {
  padding: calc(var(--nav) + 60px) 0 50px;
  background: var(--soft2);
  text-align: left;
}

.page-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.7rem);
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  font-size: clamp(1.04rem, 2vw, 1.32rem);
  max-width: 700px;
  color: var(--muted);
}

/* ============ TOOLBAR ============ */
.donation-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.search-wrap input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 1.2rem;
  outline: 0;
  font-size: 0.95rem;
}

.search-wrap input:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(118, 172, 60, 0.1);
}

.filter-dropdown {
  position: relative;
}

.filter-button {
  height: 50px;
}

.filter-button span {
  background: var(--soft);
  color: var(--deep);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  font-size: 0.85rem;
}

.filter-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 58px;
  width: 310px;
  max-height: 360px;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0.85rem;
  box-shadow: var(--shadow);
  z-index: 10;
}

.filter-dropdown.open .filter-panel {
  display: grid;
  gap: 8px;
}

.check-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem;
  border-radius: 14px;
  cursor: pointer;
}

.check-row:hover {
  background: var(--soft);
}

.check-row input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
}

.check-row span {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
}

.select-all-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.65rem;
  border-radius: 14px;
  cursor: pointer;
  background: var(--soft);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.select-all-row span {
  font-weight: 900;
  color: var(--deep);
  font-size: 0.9rem;
}

/* ============ SELECTED FILTERS ============ */
.selected-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.selected-filters span {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 800;
  color: var(--deep);
  font-size: 0.9rem;
}

/* ============ RESULT HEAD ============ */
.result-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 22px 0;
}

.result-head strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.result-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ============ DONATION LAYOUT ============ */
.donation-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* ============ CAMPAIGN GRID ============ */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.campaign-card {
  overflow: hidden;
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 38px rgba(13, 96, 50, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(13, 96, 50, 0.12);
}

.campaign-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.campaign-card > div {
  padding: 1.5rem;
}

.campaign-card .badge {
  margin-bottom: 0.8rem;
}

.campaign-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.campaign-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ============ PROGRESS BAR ============ */
.progress {
  height: 10px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1fc2d2, var(--main));
  border-radius: 999px;
}

/* ============ CAMPAIGN META ============ */
.campaign-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.campaign-meta strong {
  color: var(--deep);
  font-size: 1rem;
}

.campaign-meta span {
  color: var(--muted);
  font-size: 0.85rem;
}

.campaign-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-foot span {
  background: var(--soft);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--deep);
  font-weight: 800;
  font-size: 0.85rem;
}

/* ============ SIDEBAR ============ */
.donation-sidebar {
  position: sticky;
  top: calc(var(--nav) + 20px);
}

.sidebar-widget {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 38px rgba(13, 96, 50, 0.07);
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--deep);
  position: relative;
  padding-bottom: 0.8rem;
}

.sidebar-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--main);
  border-radius: 3px;
}

.ending-soon-list {
  display: grid;
  gap: 0;
}

.ending-soon-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  transition: padding-left 0.3s ease;
}

.ending-soon-item:hover {
  padding-left: 8px;
}

.ending-soon-item:last-child {
  border-bottom: 0;
}

.ending-soon-rank {
  font-size: 1.5rem;
  font-weight: 1000;
  color: var(--main);
  line-height: 1;
  min-width: 30px;
  text-align: center;
}

.ending-soon-content {
  flex: 1;
}

.ending-soon-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ending-soon-days {
  font-size: 0.8rem;
  color: #e74c3c;
  font-weight: 700;
}

/* ============ NO RESULTS ============ */
.no-results {
  text-align: center;
  padding: 3rem;
  background: var(--soft);
  border-radius: 20px;
  grid-column: 1 / -1;
}

.no-results h3 {
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.no-results p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ============ CAMPAIGN DETAIL HERO ============ */
.campaign-detail-hero {
  padding: calc(var(--nav) + 60px) 0 50px;
  background: var(--soft2);
}

.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  align-items: center;
}

.campaign-detail-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.2;
}

.campaign-detail-hero p {
  font-size: 1.1rem;
  max-width: 600px;
  color: var(--muted);
}

.campaign-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.campaign-facts span {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  color: var(--deep);
  font-weight: 800;
  font-size: 0.9rem;
}

/* ============ DONATE BOX ============ */
.donate-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.donate-box img {
  border-radius: 22px;
  height: 250px;
  width: 100%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.full {
  width: 100%;
}

/* ============ ARTICLE LAYOUT ============ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
  align-items: start;
}

.article-content {
  font-size: 1.05rem;
}

.article-content h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.8rem;
}

.article-content ul {
  padding-left: 1.2rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* ============ TIMELINE ============ */
.timeline {
  display: grid;
  gap: 12px;
}

.timeline > div {
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--soft2);
  border-radius: 18px;
}

.timeline b {
  display: block;
  color: var(--deep);
  margin-bottom: 0.3rem;
}

.timeline span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============ FORM SIDEBAR ============ */
.related-box {
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 38px rgba(13, 96, 50, 0.07);
}

.related-box h3 {
  margin-bottom: 1rem;
}

.input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  outline: 0;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.input:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(118, 172, 60, 0.1);
}

.small-text {
  font-size: 0.85rem;
  margin-top: 0.8rem;
  color: var(--muted);
}

.sticky {
  position: sticky;
  top: calc(var(--nav) + 20px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .donation-layout {
    grid-template-columns: 1fr;
  }
  
  .donation-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .page-hero h1,
  .campaign-detail-hero h1 {
    font-size: 2.2rem;
  }
  
  .donation-toolbar {
    grid-template-columns: 1fr;
  }
  
  .filter-panel {
    left: 0;
    right: auto;
    width: min(100%, 330px);
  }
  
  .campaign-grid {
    grid-template-columns: 1fr;
  }
  
  .split-2,
  .article-layout {
    grid-template-columns: 1fr;
  }
  
  .sticky {
    position: static;
  }
  
  .donate-box img {
    height: 200px;
  }
  
  .result-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============ DONATION FORM BOX ============ */
.donation-form-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.donation-form-box h3 {
  margin-bottom: 1.2rem;
  text-align: center;
}

/* Preset Buttons */
.donation-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1.5rem;
}

.preset-btn {
  padding: 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-btn:hover {
  border-color: var(--main);
  background: var(--soft);
}

.preset-btn.active {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
  box-shadow: 0 4px 12px rgba(13, 96, 50, 0.3);
}

/* Slider */
.donation-slider-wrap {
  margin-bottom: 1.5rem;
}

.donation-amount-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.donation-amount-display span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.donation-amount-display strong {
  color: var(--deep);
  font-size: 1.2rem;
}

.donation-slider {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--soft);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.donation-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--deep);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(13, 96, 50, 0.3);
}

.donation-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--deep);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(13, 96, 50, 0.3);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Impact Preview */
.impact-preview {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--soft);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.impact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.impact-preview p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--deep);
  font-weight: 700;
}

/* Payment Methods */
.payment-methods {
  margin-bottom: 1.5rem;
}

.payment-label {
  display: block;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.payment-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-btn:hover {
  border-color: var(--main);
}

.payment-btn.active {
  border-color: var(--deep);
  background: var(--soft);
  box-shadow: 0 2px 8px rgba(13, 96, 50, 0.1);
}

.payment-icon {
  font-size: 1.2rem;
}

/* Anonymous Checkbox */
.anonymous-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
}

.anonymous-check input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.anonymous-check span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

/* Submit Button */
.donation-submit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
}

.submit-amount {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.trust-badges span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
}