/* =========================================================
   CAMPAIGNS — LISTING + SINGLE
   All selectors prefixed .cmp-
   ========================================================= */

.cmp-page { background: var(--paper); }

/* ---------- FILTER BAR ---------- */
.cmp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem;
    margin-bottom: 1.2rem;
}

.cmp-filter-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.9rem;
    min-width: 200px;
    border-right: 1px solid var(--line);
}
.cmp-filter-field i { color: var(--marigold-deep); font-size: 0.9rem; }
.cmp-filter-field input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.45rem 0;
    font-size: 0.92rem;
    color: var(--ink);
    outline: none;
    min-width: 0;
}
.cmp-filter-field input::placeholder { color: #8a8578; }

.cmp-select {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    color: var(--ink);
    background: #fff;
    min-width: 150px;
    outline: none;
    transition: border-color 0.18s ease;
}
.cmp-select:focus { border-color: var(--marigold); }

/* ---------- BUTTONS ---------- */
.cmp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}
.cmp-btn-primary {
    background: var(--emerald);
    color: #fff;
}
.cmp-btn-primary:hover {
    background: var(--emerald-deep);
    color: #fff;
}
.cmp-btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
}
.cmp-btn-ghost:hover {
    background: var(--emerald-tint);
    color: var(--emerald-deep);
    border-color: var(--emerald-tint);
}
.cmp-btn-full { width: 100%; }
.cmp-btn-lg { padding: 0.8rem 1.4rem; font-size: 0.95rem; }

/* ---------- RESULTS HEAD ---------- */
.cmp-results-head {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}
.cmp-results-head strong {
    color: var(--emerald-deep);
    font-family: "Fraunces", serif;
    font-size: 1.05rem;
    margin-right: 0.15rem;
}

/* ---------- CARD ---------- */
.cmp-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cmp-card:hover {
    transform: translateY(-5px);
    border-color: var(--marigold);
    box-shadow: 0 14px 32px rgba(26, 84, 81, 0.12);
}

.cmp-card-img-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--emerald-tint);
}
.cmp-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.cmp-card:hover .cmp-card-img {
    transform: scale(1.06);
}

.cmp-card-body {
    padding: 1.2rem 1.3rem 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Status pill on image */
.cmp-status {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}
.cmp-status--active {
    background: rgba(220, 235, 234, 0.95);
    color: var(--emerald-deep);
}
.cmp-status--completed {
    background: rgba(243, 230, 205, 0.95);
    color: var(--marigold-deep);
}
.cmp-status--draft,
.cmp-status--cancelled {
    background: rgba(241, 226, 221, 0.95);
    color: var(--brick);
}

.cmp-urgent {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: var(--brick);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    animation: cmp-pulse 1.8s ease-in-out infinite;
}
@keyframes cmp-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

/* Category chip */
.cmp-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--emerald);
    background: var(--emerald-tint);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    align-self: flex-start;
}
.cmp-category--light {
    background: rgba(216, 178, 118, 0.22);
    color: var(--marigold);
}

.cmp-card-title {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 0 0 0.5rem;
}
.cmp-card-title a {
    color: var(--emerald-deep);
    text-decoration: none;
}
.cmp-card-title a:hover { color: var(--marigold-deep); }

.cmp-card-desc {
    font-size: 0.86rem;
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
}

/* Progress bar */
.cmp-progress { margin-bottom: 1rem; }
.cmp-progress-bar {
    height: 8px;
    background: var(--paper);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 0.55rem;
    border: 1px solid var(--line);
}
.cmp-progress-bar--lg {
    height: 12px;
    margin: 0.9rem 0 0.55rem;
}
.cmp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald), var(--marigold));
    border-radius: 20px;
    transition: width 0.6s ease;
}

.cmp-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.82rem;
}
.cmp-raised {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--emerald-deep);
}
.cmp-raised em {
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 0.72rem;
    color: var(--ink-soft);
    margin-left: 0.15rem;
}
.cmp-goal { color: var(--ink-soft); font-size: 0.78rem; }

/* Card footer meta */
.cmp-card-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    font-size: 0.78rem;
    color: var(--ink-soft);
    padding: 0.75rem 0;
    margin-bottom: 0.85rem;
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
}
.cmp-foot-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.cmp-foot-item i { color: var(--emerald); font-size: 0.75rem; }

/* Compact variant (related) */
.cmp-card--compact .cmp-card-body { padding: 1rem 1.1rem 1.1rem; }
.cmp-card--compact .cmp-card-title { font-size: 1rem; margin-bottom: 0.6rem; }

/* ---------- PAGINATION ---------- */
.cmp-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}
.cmp-pagination .pagination { gap: 0.35rem; margin: 0; }
.cmp-pagination .page-link {
    border: 1px solid var(--line);
    border-radius: 6px !important;
    color: var(--emerald-deep);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.45rem 0.8rem;
}
.cmp-pagination .page-link:hover {
    background: var(--emerald-tint);
    border-color: var(--emerald-tint);
    color: var(--emerald-deep);
}
.cmp-pagination .page-item.active .page-link {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #fff;
}

/* ---------- EMPTY ---------- */
.cmp-empty {
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: var(--ink-soft);
}
.cmp-empty i {
    font-size: 2.6rem;
    color: var(--line);
    margin-bottom: 0.9rem;
}
.cmp-empty h4 {
    font-family: "Fraunces", serif;
    color: var(--emerald-deep);
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}
.cmp-empty p { margin: 0 auto 1.4rem; max-width: 40ch; }

/* =========================================================
   SINGLE CAMPAIGN
   ========================================================= */

/* Hero */
.cmp-hero {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
}
.cmp-hero::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald), var(--marigold));
}
.cmp-hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
}
.cmp-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.18s ease;
}
.cmp-hero-back:hover { color: var(--marigold); }

.cmp-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}
.cmp-hero-title {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    color: #fff;
    line-height: 1.15;
    margin: 0 0 1rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}
.cmp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #dfeee9;
}
.cmp-hero-meta i { color: var(--marigold); margin-right: 0.35rem; }

/* Detail card */
.cmp-detail-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2rem 2.1rem;
    box-shadow: 0 10px 30px rgba(26, 84, 81, 0.06);
}

.cmp-video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: #000;
}
.cmp-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.cmp-section { margin-bottom: 2rem; }
.cmp-section:last-child { margin-bottom: 0; }

.cmp-section-title {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--emerald-deep);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.cmp-section-title i { color: var(--emerald); font-size: 0.95rem; }

.cmp-desc {
    color: var(--ink-soft);
    line-height: 1.8;
    font-size: 0.95rem;
    max-width: 72ch;
}

/* Impact grid */
.cmp-impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
.cmp-impact {
    background: var(--emerald-tint);
    border-radius: 10px;
    padding: 1.1rem 1.1rem 1rem;
    border: 1px solid #bcd9d6;
    transition: transform 0.18s ease;
}
.cmp-impact:hover { transform: translateY(-3px); }
.cmp-impact-amount {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--emerald-deep);
    margin-bottom: 0.4rem;
}
.cmp-impact p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* Share row */
.cmp-share {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cmp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
}
.cmp-share-btn:hover { color: #fff; border-color: transparent; }
.cmp-share--fb:hover { background: #1877f2; }
.cmp-share--tw:hover { background: #000; }
.cmp-share--wa:hover { background: #25d366; }
.cmp-share--copy:hover { background: var(--emerald); }

/* Sidebar */
.cmp-sidebar {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cmp-donate-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.7rem 1.6rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(26, 84, 81, 0.08);
    position: relative;
    overflow: hidden;
}
.cmp-donate-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald), var(--marigold));
}
.cmp-donate-icon {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--emerald-tint);
    color: var(--emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.cmp-side-progress { text-align: left; margin-bottom: 1.2rem; }
.cmp-side-raised {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--emerald-deep);
    line-height: 1.1;
}
.cmp-side-raised em {
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--ink-soft);
    margin-left: 0.25rem;
}
.cmp-side-goal {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 0.15rem;
}
.cmp-side-percent {
    font-size: 0.82rem;
    color: var(--ink-soft);
    text-align: right;
}
.cmp-side-percent strong {
    color: var(--emerald);
    font-family: "Fraunces", serif;
    font-size: 1rem;
}

.cmp-closed-badge {
    background: var(--emerald-tint);
    color: var(--emerald-deep);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.cmp-closed-badge--muted {
    background: var(--paper);
    color: var(--ink-soft);
}

.cmp-trust {
    display: flex;
    justify-content: space-around;
    gap: 0.6rem;
    margin-top: 1.2rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-weight: 600;
}
.cmp-trust i { color: var(--emerald); margin-right: 0.3rem; }

/* Meta card */
.cmp-meta-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem 1.4rem;
}
.cmp-meta-card h4 {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--emerald-deep);
    margin-bottom: 1rem;
}
.cmp-meta-card ul { list-style: none; padding: 0; margin: 0; }
.cmp-meta-card li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.85rem;
}
.cmp-meta-card li:last-child { border-bottom: none; }
.cmp-meta-card span { color: var(--ink-soft); }
.cmp-meta-card strong { color: var(--ink); text-align: right; }

/* Related */
.cmp-related { margin-top: 4rem; }
.cmp-related-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}
.cmp-related-head h2 {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    color: var(--emerald-deep);
    margin: 0;
}
.cmp-link {
    color: var(--emerald-deep);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}
.cmp-link:hover { color: var(--marigold-deep); }
.cmp-link i { font-size: 0.75rem; transition: transform 0.18s ease; }
.cmp-link:hover i { transform: translateX(3px); }

.cmp-related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 0.45rem;
}
.cmp-related-meta strong {
    color: var(--emerald-deep);
    font-family: "Fraunces", serif;
    font-size: 0.9rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
    .cmp-sidebar { position: static; }
    .cmp-impact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .cmp-filter-bar { flex-direction: column; align-items: stretch; }
    .cmp-filter-field {
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 0.3rem 0.5rem;
    }
    .cmp-select { width: 100%; }

    .cmp-detail-card { padding: 1.5rem 1.2rem; }
    .cmp-hero { padding: 3.5rem 0 2.5rem; min-height: 300px; }
}