.dc-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    box-sizing: border-box;
}
.dc-container *, .dc-modal * { box-sizing: border-box; }

.dc-header { text-align: center; margin-bottom: 40px; border-bottom: 3px solid #667eea; padding-bottom: 20px; }
.dc-header h1 { font-size: 2.2em; margin: 0 0 10px; }
.dc-header p  { color: #666; margin: 0; }

.dc-form-section { background: #f8f9fa; padding: 25px; border-radius: 8px; margin-bottom: 30px; }
.dc-form-section h2, .dc-donations-section h2 { margin: 0 0 20px; }

.dc-form-group { margin-bottom: 15px; }
.dc-form-group label { display: block; margin-bottom: 6px; font-weight: 600; }
.dc-form-group input {
    width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 1em; background: #fff;
}

.dc-btn-primary, .dc-btn-edit, .dc-btn-delete, .dc-btn-save, .dc-btn-cancel {
    border: 0; border-radius: 6px; padding: 10px 18px; cursor: pointer; font-size: 0.95em;
}
.dc-btn-primary { background: #667eea; color: #fff; }
.dc-btn-primary:hover { background: #5566c5; }
.dc-btn-edit   { background: #f0ad4e; color: #fff; margin-right: 6px; }
.dc-btn-delete { background: #d9534f; color: #fff; }
.dc-btn-save   { background: #28a745; color: #fff; margin-right: 6px; }
.dc-btn-cancel { background: #6c757d; color: #fff; }

.dc-donations-list { display: flex; flex-direction: column; gap: 12px; }
.dc-donation-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; border: 1px solid #eee; border-radius: 8px; background: #fafafa;
}
.dc-donation-info h3 { margin: 0 0 4px; font-size: 1.05em; }
.dc-donation-info p  { margin: 2px 0; }
.dc-date { font-size: 0.85em; color: #888; }
.dc-empty-message { color: #888; font-style: italic; }
.dc-stats { margin-top: 25px; text-align: center; font-weight: 600; }

.dc-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center; z-index: 9999;
}
.dc-modal.active { display: flex; }
.dc-modal[hidden] { display: none; }
.dc-modal-content {
    background: #fff; padding: 30px; border-radius: 10px;
    width: 100%; max-width: 460px; margin: 20px;
}
.dc-modal-buttons { margin-top: 18px; display: flex; justify-content: flex-end; }

@media (max-width: 600px) {
    .dc-container { padding: 20px; }
    .dc-donation-item { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Landing page ---------- */
.dc-landing { max-width: min(1400px, calc(100% - 32px)); margin: 0 auto; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: #1f2937; }
.dc-landing * { box-sizing: border-box; }

/* Bypass the WP block theme's narrow content-size cap on the home page. */
.is-layout-constrained > .dc-landing.alignfull {
    max-width: min(1400px, calc(100% - 32px));
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.dc-free-banner {
    margin: 0 0 24px;
    padding: 14px 20px;
    border-radius: 12px;
    background: linear-gradient(90deg, #fff7ed 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    color: #78350f;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
}
.dc-free-banner p {
    margin: 0;
    color: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.dc-free-banner p + p {
    margin-top: 8px;
    font-weight: 500;
    color: #92400e;
}

/* Hide the page title heading on the front (Home) page */
body.home .wp-block-post-title,
body.page-id-9 .wp-block-post-title,
body.page-id-7 .wp-block-post-title,
body.page-id-8 .wp-block-post-title,
body.page-id-15 .wp-block-post-title {
    display: none !important;
}

/* Hide WP page title and tighten top spacing on the NGOs listing page
   so the NGO Donation hero sits right under the site header. */
body.page-id-16 .wp-block-post-title,
body.page-id-16 .entry-title,
body.page-id-16 .entry-header,
body.page-id-16 .page-title,
body.page-id-8 .wp-block-post-title,
body.page-id-8 .entry-title,
body.page-id-8 .entry-header,
body.page-id-8 .page-title,
body.page-id-7 .wp-block-post-title,
body.page-id-7 .entry-title,
body.page-id-7 .entry-header,
body.page-id-7 .page-title { display: none !important; }
body.page-id-16 main,
body.page-id-16 .wp-site-blocks,
body.page-id-16 .wp-block-post-content,
body.page-id-16 .entry-content,
body.page-id-16 .is-layout-constrained,
body.page-id-16 .wp-block-group,
body.page-id-8 main,
body.page-id-8 .wp-site-blocks,
body.page-id-8 .wp-block-post-content,
body.page-id-8 .entry-content,
body.page-id-8 .is-layout-constrained,
body.page-id-8 .wp-block-group,
body.page-id-7 main,
body.page-id-7 .wp-site-blocks,
body.page-id-7 .wp-block-post-content,
body.page-id-7 .entry-content,
body.page-id-7 .is-layout-constrained,
body.page-id-7 .wp-block-group {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.page-id-16 .dc-listing,
body.page-id-8 .dc-listing { padding-top: 12px !important; margin-top: 0 !important; }
body.page-id-16 .dc-listing-hero,
body.page-id-8 .dc-listing-hero { margin-top: 0; }
body.page-id-7 .dc-container { padding-top: 32px !important; margin-top: 0 !important; }

/* Tighten vertical spacing above the hero on the Home page */
body.home main,
body.page-id-9 main,
body.home .wp-site-blocks,
body.page-id-9 .wp-site-blocks,
body.home .wp-site-blocks {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.home .wp-block-post-content,
body.page-id-9 .wp-block-post-content,
body.home .entry-content,
body.page-id-9 .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
body.home .wp-block-group,
body.page-id-9 .wp-block-group { padding-top: 0; }
body.home .dc-landing,
body.page-id-9 .dc-landing { margin-top: 0; }
body.home .dc-free-banner,
body.page-id-9 .dc-free-banner { margin-top: 0; }
body.home .dc-hero,
body.page-id-9 .dc-hero { padding-top: 48px; }

.dc-hero {
    position: relative; overflow: hidden; border-radius: 16px;
    padding: 72px clamp(20px, 5vw, 80px); margin-bottom: 36px;
    background: linear-gradient(135deg, #5b6cf5 0%, #8b5cf6 55%, #ec4899 100%);
    color: #fff;
    box-shadow: 0 20px 50px rgba(91, 108, 245, 0.25);
    /* Break out of the .dc-landing container so the hero nearly spans the viewport,
       leaving a 4px gutter on each side. */
    width: calc(100vw - 8px);
    margin-left: calc(50% - 50vw + 4px);
    margin-right: calc(50% - 50vw + 4px);
}
.dc-hero-inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; }
.dc-cta-and-side {
    display: flex; align-items: flex-start; gap: 28px;
    margin-bottom: 36px;
}
.dc-cta-and-side > .dc-cta-row {
    flex: 1 1 auto; min-width: 0; margin-bottom: 0;
}
.dc-hero-top-items-side {
    flex: 0 0 260px; align-self: stretch;
    margin-top: 0; padding: 16px 18px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    backdrop-filter: blur(6px);
}
.dc-hero-top-items-side.dc-hero-top-items { border-top: 1px solid rgba(255,255,255,0.25); padding-top: 16px; }
.dc-eyebrow {
    display: inline-block; padding: 6px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.18); font-size: 0.85em; letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 18px; backdrop-filter: blur(6px);
}
.dc-hero h1 {
    font-size: clamp(1.2em, 4.5vw, 3.4em);
    line-height: 1.1;
    margin: 0 0 18px;
    font-weight: 800;
    white-space: nowrap;
    overflow-wrap: normal;
    word-wrap: normal;
}
.dc-hero h1 > .dc-grad { white-space: nowrap; }
.dc-grad { background: linear-gradient(90deg, #fde68a, #fca5a5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dc-lede { font-size: 1.05em; line-height: 1.55; margin: 0 0 28px; opacity: 0.95; max-width: none; text-align: left; margin-left: 0; overflow-wrap: anywhere; word-wrap: break-word; }
.dc-cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.dc-btn-cta {
    display: inline-block; padding: 14px 26px; border-radius: 10px; font-weight: 700;
    text-decoration: none; font-size: 1.02em; transition: transform .15s ease, box-shadow .15s ease;
}
.dc-btn-cta:hover { transform: translateY(-2px); }
.dc-btn-cta-primary { background: #fff; color: #5b6cf5; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.dc-btn-cta-primary:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.22); }
.dc-btn-cta-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.55); }
.dc-btn-cta-ghost:hover { background: rgba(255,255,255,0.22); }

/* Tab strip (e.g. Active / Completed on Campaigns list) — must clearly show selected state on a light page background. */
.dc-tabs button[data-dc-tab] {
    background: #fff;
    color: #4b5563;
    border: 1px solid #d1d5db;
    box-shadow: none;
    cursor: pointer;
}
.dc-tabs button[data-dc-tab]:hover { background: #f3f4f6; }
.dc-tabs button[data-dc-tab][aria-selected="true"] {
    background: #5b6cf5;
    color: #fff;
    border-color: #5b6cf5;
    box-shadow: 0 6px 16px rgba(91,108,245,0.35);
}
.dc-tabs button[data-dc-tab][aria-selected="true"]:hover { background: #4a59d4; border-color: #4a59d4; }
.dc-tabs button[data-dc-tab]:focus-visible { outline: 3px solid rgba(91,108,245,0.45); outline-offset: 2px; }

.dc-hero-stats { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.25); }
.dc-hero-stats-row { display: flex; flex-wrap: wrap; gap: 32px; }
.dc-hero-stats-row > div { display: flex; flex-direction: column; }
.dc-hero-stats strong { font-size: 1.8em; font-weight: 800; line-height: 1; }
.dc-hero-stats span { opacity: 0.85; font-size: 0.9em; margin-top: 4px; }

/* One-line variant: fit all stats in a single row, scaling type down to fit. */
.dc-hero-stats-compact .dc-hero-stats-row {
    flex-wrap: nowrap;
    gap: clamp(10px, 1.6vw, 24px);
    align-items: flex-start;
}
.dc-hero-stats-compact .dc-hero-stats-row > div { min-width: 0; flex: 1 1 0; }
.dc-hero-stats-compact strong { font-size: clamp(1em, 1.6vw, 1.4em); white-space: nowrap; }
.dc-hero-stats-compact span { font-size: clamp(0.7em, 0.9vw, 0.82em); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* On phones, let compact stats wrap to 2 rows instead of squashing to 1px wide. */
@media (max-width: 560px) {
    .dc-hero-stats-compact .dc-hero-stats-row {
        flex-wrap: wrap;
        gap: 14px 20px;
    }
    .dc-hero-stats-compact .dc-hero-stats-row > div { flex: 1 1 40%; }
    .dc-hero-stats-compact strong { font-size: 1.2em; }
    .dc-hero-stats-compact span { font-size: 0.85em; white-space: normal; overflow: visible; }
}

.dc-hero-top-items { margin-top: 6px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,0.3); }
.dc-hero-top-items-title { font-size: 0.85em; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; margin-bottom: 8px; }
.dc-hero-top-items ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dc-hero-top-items li { display: flex; justify-content: space-between; gap: 16px; font-size: 0.95em; }
.dc-top-item-name { opacity: 0.95; }
.dc-top-item-qty { font-weight: 700; }

.dc-hero-orbs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.dc-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.dc-orb-a { width: 320px; height: 320px; background: #fca5a5; top: -80px; right: -60px; }
.dc-orb-b { width: 260px; height: 260px; background: #38bdf8; bottom: -90px; right: 30%; }
.dc-orb-c { width: 220px; height: 220px; background: #fde68a; top: 30%; right: 18%; opacity: 0.35; }

.dc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 36px; }
.dc-card {
    display: block; text-decoration: none; color: inherit;
    background: #fff; border-radius: 16px; padding: 28px;
    border: 1px solid #e5e7eb; box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dc-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(91,108,245,0.12); border-color: #c7d2fe; }
.dc-card-icon {
    width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, #eef2ff, #fce7f3); font-size: 1.8em; margin-bottom: 14px;
}
.dc-card h2 { margin: 0 0 8px; font-size: 1.25em; }
.dc-card p { margin: 0 0 14px; color: #4b5563; line-height: 1.55; }
.dc-card-cta { font-weight: 700; color: #5b6cf5; }

.dc-steps { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 32px; }
.dc-steps h2 { margin: 0 0 22px; }
.dc-steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.dc-steps li { display: flex; gap: 14px; align-items: flex-start; }
.dc-step-n {
    flex: none; width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #5b6cf5, #8b5cf6); color: #fff;
    display: grid; place-items: center; font-weight: 800;
}
.dc-steps h3 { margin: 2px 0 4px; font-size: 1.05em; }
.dc-steps p { margin: 0; color: #4b5563; line-height: 1.5; }

@media (max-width: 900px) {
    .dc-cta-and-side { flex-direction: column; }
    .dc-hero-top-items-side { flex-basis: auto; width: 100%; }
}

@media (max-width: 640px) {
    /* Hero already breaks out via width: 100vw + negative margins; tighten padding on phones */
    .dc-landing,
    .is-layout-constrained > .dc-landing.alignfull {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    /* Disable the desktop "100vw breakout" on phones: the negative-margin math
       depends on the .dc-landing container being perfectly centered in the
       viewport, which isn't true under this WP theme (the post content has
       30px global padding). On mobile that mismatch pushes the hero a few px
       off-screen to the left, clipping the first letter of every line
       ("Turn" → "urn", "List" → "t", "COMMUNITY" → "OMMUNITY"). On phones,
       just let the hero fill its container — no breakout needed. */
    .dc-hero {
        width: auto;
        margin-left: 0;
        margin-right: 0;
        padding: 28px 14px;
    }
    .dc-hero h1 {
        font-size: clamp(0.85em, 5vw, 1.9em);
        /* Allow the headline to wrap on narrow screens instead of forcing
           a single line that overflows the hero. */
        white-space: normal;
        overflow-wrap: break-word;
    }
    .dc-hero h1 > .dc-grad { white-space: normal; }
    .dc-hero-stats { gap: 14px; }
    .dc-hero-stats-row { gap: 20px; flex-wrap: wrap; }
    .dc-hero-stats-row > div { flex: 1 1 40%; min-width: 0; }
    body.home .dc-hero,
    body.page-id-9 .dc-hero { padding-top: 28px; }

    /* CTA buttons: long labels (e.g. "List your NGO and monthly requirements")
       were squeezing edge-to-edge inside the padding box on narrow phones.
       Give them room to breathe: stack full-width, tighten padding, allow
       word breaks so no single word can clip the button. */
    .dc-cta-row { gap: 10px; margin-bottom: 24px; }
    .dc-cta-row .dc-btn-cta {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
        padding: 12px 18px;
        font-size: 0.98em;
        text-align: center;
        line-height: 1.35;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}
/* Ultra-narrow phones (e.g. Galaxy Fold ~280px): scale headline down so
   "Turn generosity into real impact." never gets clipped. */
@media (max-width: 420px) {
    .dc-hero { padding: 24px 12px; }
    .dc-hero h1 { font-size: 4.4vw; letter-spacing: -0.02em; }
}
@media (max-width: 340px) {
    .dc-hero h1 { font-size: 4.2vw; }
}

/* ---------- Mobile safety: prevent any horizontal overflow on phones ---------- */
@media (max-width: 720px) {
    .dc-landing,
    .dc-listing,
    .dc-container,
    [data-dc-view] {
        max-width: 100%;
        overflow-x: hidden;
    }
    .dc-landing img,
    .dc-listing img,
    .dc-container img,
    [data-dc-view] img {
        max-width: 100%;
        height: auto;
    }
}

/* ---------- Campaigns listing ---------- */
.dc-listing { max-width: 1100px; margin: 0 auto; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: #1f2937; }
.dc-listing * { box-sizing: border-box; }

.dc-listing-hero {
    position: relative; overflow: hidden; border-radius: 16px;
    padding: 48px clamp(20px, 5vw, 80px); margin-bottom: 28px; color: #fff;
    background: linear-gradient(135deg, #0ea5e9 0%, #5b6cf5 60%, #8b5cf6 100%);
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.22);
    /* Break out of the .dc-listing container so the hero nearly spans the viewport,
       leaving a 16px gutter on each side. */
    width: calc(100vw - 32px);
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
}
.dc-listing-hero-inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; }
.dc-listing-hero h1 { font-size: clamp(1.8em, 3.6vw, 2.6em); margin: 8px 0 10px; font-weight: 800; line-height: 1.15; }
.dc-listing-hero p  { margin: 0 0 20px; opacity: .95; font-size: 1.05em; }

/* NGO detail hero: legacy class kept for backward compatibility. The
   `.dc-detail-photos-top` rules drive the actual layout now (shared
   with the campaign detail page). */
.dc-ngo-detail-hero {
    margin: 0 0 14px;
}

.dc-campaign-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.dc-campaign-grid > .dc-empty-message,
.dc-campaign-grid > p { grid-column: 1 / -1; }

/* In detail mode the same #dc-campaignsList element holds a single
   campaign — switch it to a normal block so children take full width. */
.dc-listing.dc-detail-mode .dc-campaign-grid,
.dc-container.dc-detail-mode .dc-campaign-grid {
    display: block;
}

.dc-cc {
    --dc-accent: #5b6cf5;
    position: relative; display: flex; flex-direction: column; gap: 14px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    padding: 22px; text-decoration: none; color: inherit;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    overflow: hidden;
}
.dc-cc::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: var(--dc-accent);
}
.dc-cc:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.10); border-color: #c7d2fe; }

.dc-cc-top { display: flex; gap: 14px; align-items: center; }
.dc-cc-avatar {
    flex: none; width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2em;
    background: linear-gradient(135deg, var(--dc-accent), #1f2937);
}
.dc-cc-meta { min-width: 0; flex: 1 1 auto; }

/* Card title pulled out of the avatar row so it starts flush-left of the card,
   on its own single line (truncates with ellipsis when too long). */
.dc-cc-title {
    display: flex; align-items: center; gap: 8px;
    width: 100%; min-width: 0;
}
.dc-cc-title h3 {
    margin: 0; font-size: 1.1em; font-weight: 700; line-height: 1.3;
    flex: 1 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: left;
}

/* Verified / Unverified badge sits on its own row, just under the title. */
.dc-cc-badges {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: -6px;
}

.dc-cc-owner { margin: 0; color: #6b7280; font-size: 0.88em; }
.dc-cc-date { white-space: nowrap; }

/* DONATE button anchored top-right; reserve space on the card so the
   title column never collides with it (overrides any inline padding). */
.dc-cc-wrap { position: relative; }
.dc-cc-wrap .dc-list-donate {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    text-decoration: none; white-space: nowrap;
    padding: 8px 16px; font-size: 0.92em;
}
.dc-cc-wrap-has-donate > .dc-cc { padding-right: 168px; }
@media (max-width: 520px) {
    /* On narrow screens drop the button below the title row instead of overlapping it. */
    .dc-cc-wrap-has-donate > .dc-cc { padding-right: 22px; padding-top: 60px; }
    .dc-cc-wrap .dc-list-donate { top: 14px; right: 14px; left: auto; }
}
.dc-cc-desc {
    margin: 0; color: #4b5563; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.dc-cc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: #eef2ff; color: #3730a3;
    border-radius: 999px; padding: 4px 10px; font-size: 0.82em; font-weight: 600;
}
.dc-chip em { font-style: normal; opacity: .75; font-weight: 500; }
.dc-chip-more { background: #f3f4f6; color: #374151; }

.dc-cc-foot {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
    padding-top: 12px; border-top: 1px dashed #e5e7eb;
    font-size: 0.9em; color: #6b7280;
}
.dc-cc-stat strong { color: #111827; }
.dc-cc-cta { margin-left: auto; color: var(--dc-accent); font-weight: 700; }

@media (max-width: 640px) {
    .dc-listing-hero { padding: 36px 22px; border-radius: 14px; }
}

/* Campaign photo upload preview & detail gallery */
.dc-photos-preview { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-photo-thumb {
    width: 96px; height: 96px; object-fit: cover;
    border-radius: 8px; border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dc-photo-gallery {
    display: flex; gap: 12px; flex-wrap: wrap;
    margin: 12px 0 4px;
}
.dc-photo-thumb-lg {
    width: 220px; max-width: 100%; height: 160px; object-fit: cover;
    border-radius: 12px; border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform .15s ease;
}
.dc-photo-thumb-lg:hover { transform: scale(1.02); }

/* ===== Campaign detail view ===== */
.dc-container.dc-detail-mode,
.dc-listing.dc-detail-mode {
    /* Fill the parent (which is forced to full viewport width below via
       body.dc-detail-active resets) minus a 16px gutter on each side, and
       center via auto margins so the layout never drifts left/right
       regardless of the theme's container padding. */
    max-width: 100%;
    width: calc(100% - 32px);
    margin-left: auto;
    margin-right: auto;
    padding: 12px 0 32px;
    box-sizing: border-box;
    /* Establish a containment context so .dc-detail-grid can adapt to
       the wrapper's actual width regardless of viewport size. */
    container-type: inline-size;
    container-name: dcdetail;
}

/* When viewing a single campaign, hide the page-level listing hero
   ("Active Donation Campaigns" banner) so the campaign hero + Donate
   block appear at the very top of the page. */
body.dc-detail-active .dc-listing-hero { display: none; }
body.dc-detail-active .dc-listing > .dc-tabs,
body.dc-detail-active .dc-listing > .dc-list-toolbar { display: none; }
/* Suppress the underlying WP page title/header when viewing a detail. */
body.dc-detail-active .wp-block-post-title,
body.dc-detail-active .entry-title,
body.dc-detail-active .entry-header,
body.dc-detail-active .wp-block-template-part header.wp-block-template-part,
body.dc-detail-active .page-title { display: none !important; }
/* Strip top spacing from the theme's main/content wrappers so the
   campaign hero sits right under the site header. Also strip horizontal
   padding/max-width so our detail wrapper has the full viewport to work
   with — otherwise the theme's content column (often offset to the left
   under a sidebar/template-part) drags everything sideways. */
body.dc-detail-active main,
body.dc-detail-active .wp-site-blocks,
body.dc-detail-active .wp-block-post-content,
body.dc-detail-active .entry-content,
body.dc-detail-active .is-layout-constrained,
body.dc-detail-active .is-layout-flow,
body.dc-detail-active .wp-block-group {
    padding-top: 0 !important;
    margin-top: 0 !important;
    row-gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* Force tight top spacing on the detail wrapper, beating the
   campaigns-list view's 32px top padding via higher specificity. */
body.dc-detail-active .dc-listing.dc-detail-mode,
body.dc-detail-active .dc-listing[data-dc-view="campaigns-list"].dc-detail-mode {
    padding-top: 6px !important;
    padding-bottom: 32px;
    margin-top: 0 !important;
}

.dc-detail-back { margin: 0 0 6px; }
.dc-detail-back a {
    display: inline-flex; align-items: center; gap: 4px;
    color: #4f46e5; text-decoration: none; font-weight: 600; font-size: 0.95em;
}
.dc-detail-back a:hover { text-decoration: underline; }

.dc-detail-hero {
    display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch;
    margin-bottom: 20px;
}
.dc-detail-hero-text {
    flex: 1 1 320px; min-width: 0; max-width: 100%;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 60%, #fdf2f8 100%);
    border: 1px solid #e5e7eb; border-radius: 18px;
    padding: 24px 32px;
}
.dc-detail-hero-text h2 {
    margin: 0 0 12px; font-size: 2.6em; line-height: 1.12; color: #111827;
    font-weight: 700; letter-spacing: -0.01em;
}
.dc-detail-desc { margin: 0 0 16px; color: #374151; font-size: 1.12em; line-height: 1.5; }
.dc-detail-meta {
    display: flex; flex-wrap: wrap; gap: 10px 20px;
    margin: 0; color: #4b5563; font-size: 0.95em;
}
.dc-detail-meta span {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 999px;
    padding: 6px 14px; white-space: nowrap;
}
.dc-detail-photos-top {
    margin: 0 0 18px;
}
.dc-detail-photos-top .dc-detail-hero-photos {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.dc-detail-photos-top .dc-photo-wrap {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    background: #f3f4f6;
}
.dc-detail-photos-top .dc-photo-wrap > a {
    display: block; width: 100%; height: 100%;
}
.dc-detail-photos-top .dc-photo-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    display: block;
    transition: transform .2s ease;
}
.dc-detail-photos-top .dc-photo-wrap img:hover { transform: scale(1.02); }
.dc-detail-hero-photos {
    flex: 0 0 auto;
    position: relative;
    width: min(640px, 100%);
}
.dc-photo-slider .dc-photo-track {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    background: #f3f4f6;
}
.dc-photo-slider .dc-photo-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease;
    pointer-events: none;
}
.dc-photo-slider .dc-photo-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.dc-detail-hero-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    transition: transform .15s ease;
    display: block;
}
.dc-detail-hero-photos img:hover { transform: scale(1.02); }
.dc-photo-wrap { position: relative; display: block; }
.dc-photo-slider .dc-photo-wrap { width: 100%; height: 100%; }
.dc-photo-slider .dc-photo-wrap > a { display: block; width: 100%; height: 100%; }
.dc-photo-del {
    position: absolute; top: 8px; right: 8px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: rgba(220, 38, 38, 0.92); color: #fff;
    font-size: 16px; line-height: 1; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, transform .15s ease;
    z-index: 3;
}
.dc-photo-del:hover { background: #b91c1c; transform: scale(1.08); }

/* Slider arrows */
.dc-photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: background .15s ease, transform .15s ease;
    z-index: 4;
    backdrop-filter: blur(4px);
}
.dc-photo-nav:hover {
    background: rgba(15, 23, 42, 0.78);
    transform: translateY(-50%) scale(1.06);
}
.dc-photo-prev { left: 10px; }
.dc-photo-next { right: 10px; }

/* Slider dots */
.dc-photo-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 4;
}
.dc-photo-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    box-shadow: 0 0 0 1px rgba(15,23,42,0.35);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.dc-photo-dot:hover { background: rgba(255,255,255,0.85); }
.dc-photo-dot.is-active {
    background: #ffffff;
    transform: scale(1.25);
}

.dc-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}
.dc-detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dc-detail-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dc-detail-main > *, .dc-detail-side > * { min-width: 0; max-width: 100%; }

/* Switch to 2 columns only when the wrapper itself is wide enough
   (container-query, not viewport-query). Prevents squishy/overlapping
   layouts when the theme constrains us narrower than expected. */
@container dcdetail (min-width: 820px) {
    .dc-detail-grid {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
        gap: 24px;
    }
}

.dc-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.dc-card > h3 { margin: 0 0 14px; font-size: 1.15em; color: #111827; }
.dc-card-accent {
    border-color: #c7d2fe;
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%);
}

.dc-table { width: 100%; border-collapse: collapse; }
.dc-table th, .dc-table td {
    padding: 9px 8px; border-bottom: 1px solid #f1f5f9; font-size: 0.95em;
}
.dc-table thead th {
    border-bottom: 1px solid #e5e7eb; color: #374151;
    font-weight: 600; background: #f9fafb;
}
.dc-table tbody tr:hover td { background: #fafafa; }
.dc-table .dc-private,
.dc-table th.dc-private { background: #fffbe6; }
.dc-table .dc-date { color: #6b7280; white-space: nowrap; }
.dc-table-wrap { overflow-x: auto; }

.dc-stack { display: flex; flex-direction: column; gap: 12px; }
.dc-stack .dc-form-group { margin: 0; }
.dc-stack textarea,
.dc-stack select,
.dc-stack input {
    width: 100%; padding: 10px 12px; border: 1px solid #d1d5db;
    border-radius: 8px; font-size: 0.95em; background: #fff; box-sizing: border-box;
}
.dc-stack label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.92em; color: #374151; }
.dc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-muted { color: #6b7280; margin: 0 0 10px; }
.dc-small { font-size: 0.85em; }
.dc-ok { color: #15803d; margin: 0 0 10px; font-weight: 600; }

@media (max-width: 920px) {
    .dc-container.dc-detail-mode,
    .dc-listing.dc-detail-mode {
        /* Slightly tighter inner padding; horizontal gutters come from the
           auto-margin centering above. */
        padding: 12px 0 32px;
    }
}
@media (max-width: 720px) {
    .dc-container.dc-detail-mode,
    .dc-listing.dc-detail-mode {
        /* On phones use a smaller 8px gutter so content fits. */
        width: calc(100% - 16px);
        padding: 12px 0 32px;
    }
}
@media (max-width: 520px) {
    .dc-detail-hero-text { padding: 22px; }
    .dc-detail-hero-text h2 { font-size: 1.7em; }
    .dc-detail-hero-photos { width: 100%; max-width: 100%; }
    .dc-photo-slider .dc-photo-track { aspect-ratio: 4 / 3; }
}

/* Widen the theme's layout-constrained content area only when viewing a
   campaign detail. Twenty Twenty-Five (and most block themes) cap content
   width via these CSS custom properties, so bumping them here lets our
   wrapper take more horizontal space without breaking out of the DOM. */
body.dc-detail-active main,
body.dc-detail-active .is-layout-constrained,
body.dc-detail-active .entry-content,
body.dc-detail-active .wp-block-post-content {
    --wp--style--global--content-size: 1180px;
    --wp--style--global--wide-size: 1180px;
}

/* Hide the auto-generated "Donation Campaign" page from the site navigation */
.wp-block-pages-list__item:has(> a[href*="page_id=6"]),
.wp-block-navigation-item:has(> a[href*="page_id=6"]) {
    display: none !important;
}

/* ---------- Create Campaign / List NGO / Active Campaigns: full-width layout ---------- */
.dc-container[data-dc-view="create-campaign"],
.dc-container[data-dc-view="list-ngo"],
.dc-listing[data-dc-view="campaigns-list"],
.is-layout-constrained > .dc-container.alignfull[data-dc-view="create-campaign"],
.is-layout-constrained > .dc-container.alignfull[data-dc-view="list-ngo"],
.is-layout-constrained > .dc-listing.alignfull[data-dc-view="campaigns-list"] {
    /* Break out of the theme's narrow content area so the form section spans
       the full viewport width with a 16px gutter on each side. */
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
    padding: 32px clamp(20px, 4vw, 56px);
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .dc-container[data-dc-view="create-campaign"],
    .dc-container[data-dc-view="list-ngo"],
    .dc-listing[data-dc-view="campaigns-list"] { padding: 20px; }
}

/* List your NGO: scale down typography on mobile so labels, headings,
   and inputs feel comfortable on small screens. */
@media (max-width: 640px) {
    .dc-container[data-dc-view="list-ngo"] { font-size: 14px; }
    .dc-container[data-dc-view="list-ngo"] .dc-header h1 { font-size: 1.5em; }
    .dc-container[data-dc-view="list-ngo"] .dc-header p  { font-size: 0.92em; }
    .dc-container[data-dc-view="list-ngo"] label { font-size: 0.95em; }
    .dc-container[data-dc-view="list-ngo"] input,
    .dc-container[data-dc-view="list-ngo"] select,
    .dc-container[data-dc-view="list-ngo"] textarea { font-size: 0.95em; }
    .dc-container[data-dc-view="list-ngo"] small { font-size: 0.8em; }
    .dc-container[data-dc-view="list-ngo"] button { font-size: 0.95em; }
}
@media (max-width: 420px) {
    .dc-container[data-dc-view="list-ngo"] { font-size: 13px; }
    .dc-container[data-dc-view="list-ngo"] .dc-header h1 { font-size: 1.3em; }
}

/* Tighten the gap above the "List your NGO" heading so it sits closer
   to the site Home button / nav header above it. */
.dc-container[data-dc-view="list-ngo"] {
    padding-top: 8px;
    margin-top: -48px;
}
.dc-container[data-dc-view="list-ngo"] .dc-header {
    margin-top: 0;
    padding-top: 28px;
    padding-bottom: 28px;
    margin-bottom: 24px;
    /* Break out of the centered 800px .dc-container so the hero spans the
       viewport with a 16px gutter on each side (i.e. webpage − 16pt). */
    width: calc(100vw - 32px);
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
    border-bottom: none;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9 0%, #5b6cf5 60%, #8b5cf6 100%);
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.22);
}
.dc-container[data-dc-view="list-ngo"] .dc-header h1 {
    margin-top: 0;
    color: #fff;
}
.dc-container[data-dc-view="list-ngo"] .dc-header p {
    color: rgba(255,255,255,0.95);
}
@media (max-width: 720px) {
    .dc-container[data-dc-view="list-ngo"] .dc-header {
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Also collapse the theme / block-editor spacing that sits *above* our
   container on the List-your-NGO page (template padding, wp-block gaps,
   entry-content top margin, etc.). */
body.page-list-ngo .wp-site-blocks,
body.page-list-ngo .entry-content,
body.page-list-ngo main,
body.page-list-ngo .wp-block-group {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.page-list-ngo .entry-content > *:first-child,
body.page-list-ngo main > *:first-child,
body.page-list-ngo .wp-block-post-content > *:first-child {
    margin-top: 0 !important;
}
body.page-list-ngo .wp-block-template-part + *,
body.page-list-ngo header.wp-block-template-part + * {
    margin-top: 0 !important;
}

/* Organizer row: 4 fields (name | email | phone | address) on one line. */
[data-dc-view="create-campaign"] .dc-form-row-organizer {
    display: flex;
    gap: 16px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
}
[data-dc-view="create-campaign"] .dc-form-row-organizer > .dc-form-group {
    flex: 1 1 220px;
    min-width: 0;
    max-width: none;
    margin-bottom: 0;
}
[data-dc-view="create-campaign"] .dc-form-row-organizer input,
[data-dc-view="create-campaign"] .dc-form-row-organizer textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    background: #fff;
}
[data-dc-view="create-campaign"] .dc-form-row-organizer textarea { resize: vertical; }
@media (max-width: 720px) {
    [data-dc-view="create-campaign"] .dc-form-row-organizer > .dc-form-group { flex: 1 1 100%; }
}

/* Photos sits on its own row below the organizer row. */
[data-dc-view="create-campaign"] .dc-form-row-photos-only {
    display: block;
    margin-bottom: 15px;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-only .dc-form-group-photos {
    margin-top: 0;
    max-width: 480px;
}

/* Photos + Distribution Date + Location + Map link on the same row. */
[data-dc-view="create-campaign"] .dc-form-row-photos-date {
    display: flex;
    gap: 24px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date > .dc-form-group {
    flex: 1 1 240px;
    min-width: 0;
    margin-bottom: 0;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date .dc-form-group-photos {
    flex: 1 1 280px;
    max-width: 360px;
    margin-top: 0;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date .dc-form-group-dist {
    flex: 0 1 220px;
    max-width: 240px;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date .dc-form-group-dist input[type="date"] {
    width: 100%;
    max-width: 220px;
    padding: 10px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date .dc-form-group-location {
    flex: 1 1 260px;
    max-width: 360px;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date .dc-form-group-location textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    resize: vertical;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date .dc-form-group-maplink {
    flex: 1 1 240px;
    max-width: 320px;
}
[data-dc-view="create-campaign"] .dc-form-row-photos-date .dc-form-group-maplink input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}
@media (max-width: 1100px) {
    [data-dc-view="create-campaign"] .dc-form-row-photos-date > .dc-form-group { flex: 1 1 calc(50% - 12px); max-width: none; }
}
@media (max-width: 720px) {
    [data-dc-view="create-campaign"] .dc-form-row-photos-date > .dc-form-group { flex: 1 1 100%; }
}

/* ---------- Daily mini-campaign series block ---------- */
[data-dc-view="create-campaign"] .dc-form-group-recurring {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    width: 100%;
}
[data-dc-view="create-campaign"] .dc-recurring-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.4;
}
/* Override the global .dc-form-group input { width: 100% } for this checkbox */
[data-dc-view="create-campaign"] .dc-recurring-toggle input[type="checkbox"] {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    transform: scale(1.15);
}
[data-dc-view="create-campaign"] .dc-recurring-toggle span {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}
[data-dc-view="create-campaign"] .dc-recurring-help {
    display: block;
    color: #475569;
    margin-top: 8px;
    line-height: 1.5;
}
[data-dc-view="create-campaign"] .dc-recurring-validity {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}
[data-dc-view="create-campaign"] .dc-recurring-validity[hidden] { display: none; }
[data-dc-view="create-campaign"] .dc-recurring-validity label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
[data-dc-view="create-campaign"] .dc-recurring-validity input[type="date"] {
    width: 100%;
    max-width: 220px;
    padding: 10px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}
[data-dc-view="create-campaign"] .dc-recurring-validity small {
    display: block;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
}

/* ---------- Create Campaign: compact date inputs, larger description ---------- */
.dc-campaign-type {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 14px;
    font-weight: 600;
}
.dc-campaign-type label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.dc-campaign-type input[type="checkbox"] { width: auto; margin: 0; transform: scale(1.1); }
[data-dc-view="create-campaign"] .dc-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
[data-dc-view="create-campaign"] .dc-form-row .dc-form-group {
    flex: 1 1 220px;
    margin-bottom: 0;
}
[data-dc-view="create-campaign"] #dc-cPhotos { width: 100%; max-width: 240px; }
[data-dc-view="create-campaign"] .dc-form-row-dates .dc-form-group {
    flex: 0 0 auto;
}
[data-dc-view="create-campaign"] .dc-form-group input[type="date"] {
    width: auto;
    max-width: 180px;
    padding: 6px 8px;
    font-size: 0.85em;
}
@media (max-width: 540px) {
    [data-dc-view="create-campaign"] .dc-form-row .dc-form-group { flex: 1 1 100%; }
}
[data-dc-view="create-campaign"] #dc-cDesc {
    width: 100%;
    min-height: 380px;
    padding: 14px 16px;
    font-size: 1.02em;
    line-height: 1.55;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    resize: vertical;
    font-family: inherit;
}
[data-dc-view="create-campaign"] .dc-form-group-photos { margin-top: 4px; max-width: 360px; }
[data-dc-view="create-campaign"] .dc-form-group-photos label { font-size: 0.9em; }
[data-dc-view="create-campaign"] #dc-cPhotos {
    width: 100%;
    padding: 4px;
    font-size: 0.8em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}
[data-dc-view="create-campaign"] #dc-cPhotos::-webkit-file-upload-button {
    font-size: 0.8em;
    padding: 4px 8px;
}
[data-dc-view="create-campaign"] .dc-form-group-photos small { font-size: 0.75em; }

/* Video embeds (organizer + community) */
.dc-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 6px;
}
.dc-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.dc-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
[data-dc-view="create-campaign"] .dc-form-group-videos { margin-top: 4px; }
[data-dc-view="create-campaign"] .dc-form-group-videos input { width: 100%; }
[data-dc-view="create-campaign"] .dc-form-group-videos small { font-size: 0.75em; }

/* ---------- NGO edit form: 2-column grid layout ---------- */
.dc-ngo-edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 16px;
    align-items: start;
}
.dc-ngo-edit-form > h2,
.dc-ngo-edit-form > .dc-form-full,
.dc-ngo-edit-form > #dc-nEditMsg,
.dc-ngo-edit-form > .dc-form-actions {
    grid-column: 1 / -1;
}
.dc-ngo-edit-form .dc-form-group { margin-bottom: 0; }
.dc-form-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 720px) {
    .dc-ngo-edit-form { grid-template-columns: 1fr; }
}

/* =========================================================================
 * Create Campaign — colorful, attractive theme (scoped to this view only)
 * ========================================================================= */
.dc-container[data-dc-view="create-campaign"] {
    background:
        radial-gradient(circle at 0% 0%, rgba(102,126,234,0.10), transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(244,114,182,0.10), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(45,212,191,0.10), transparent 55%),
        #ffffff;
    border: 1px solid rgba(102,126,234,0.15);
    box-shadow: 0 18px 50px rgba(102,126,234,0.18), 0 4px 12px rgba(15,23,42,0.06);
}

[data-dc-view="create-campaign"] .dc-header {
    position: relative;
    /* Full-bleed: span the viewport with a 16px gutter on each side. */
    width: calc(100vw - 32px);
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
    margin-top: -32px;
    margin-bottom: 32px;
    padding: 44px clamp(20px, 5vw, 80px) 32px;
    text-align: center;
    color: #fff;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f472b6 100%);
    overflow: hidden;
}
[data-dc-view="create-campaign"] .dc-header::before,
[data-dc-view="create-campaign"] .dc-header::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
}
[data-dc-view="create-campaign"] .dc-header::before {
    background: #2dd4bf;
    top: -90px;
    left: -60px;
}
[data-dc-view="create-campaign"] .dc-header::after {
    background: #fbbf24;
    bottom: -120px;
    right: -70px;
}
[data-dc-view="create-campaign"] .dc-header > * { position: relative; z-index: 1; }
[data-dc-view="create-campaign"] .dc-header h1 {
    color: #fff;
    font-size: 2.4em;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(15,23,42,0.25);
}
[data-dc-view="create-campaign"] .dc-header p {
    color: rgba(255,255,255,0.92);
    font-size: 1.05em;
}

[data-dc-view="create-campaign"] .dc-campaign-type {
    margin-top: 18px;
}
[data-dc-view="create-campaign"] .dc-campaign-type label {
    background: rgba(255,255,255,0.18);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.35);
    transition: background .15s ease, transform .15s ease;
}
[data-dc-view="create-campaign"] .dc-campaign-type label:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-1px);
}

/* Form sections become colored cards with a left accent stripe. */
[data-dc-view="create-campaign"] .dc-form-section {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.06);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15,23,42,0.05);
    padding: 28px 28px 24px;
    margin-bottom: 28px;
    overflow: hidden;
}
[data-dc-view="create-campaign"] .dc-form-section::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #667eea, #f472b6 60%, #2dd4bf);
}

[data-dc-view="create-campaign"] .dc-form-group label {
    color: #1f2937;
    font-weight: 600;
    letter-spacing: 0.01em;
}

[data-dc-view="create-campaign"] .dc-form-group input,
[data-dc-view="create-campaign"] .dc-form-group textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
[data-dc-view="create-campaign"] .dc-form-group input:hover,
[data-dc-view="create-campaign"] .dc-form-group textarea:hover {
    border-color: #a5b4fc;
}
[data-dc-view="create-campaign"] .dc-form-group input:focus,
[data-dc-view="create-campaign"] .dc-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.18);
    background: #fefefe;
}

/* Recurring toggle — pill-style with active state */
[data-dc-view="create-campaign"] .dc-form-group-recurring {
    background: linear-gradient(135deg, rgba(45,212,191,0.10), rgba(102,126,234,0.10));
    border: 1px dashed rgba(45,212,191,0.55);
    border-radius: 12px;
    padding: 18px 20px;
}
[data-dc-view="create-campaign"] .dc-recurring-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid rgba(102,126,234,0.35);
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
[data-dc-view="create-campaign"] .dc-recurring-toggle:hover {
    border-color: #2dd4bf;
    transform: translateY(-1px);
}
[data-dc-view="create-campaign"] .dc-recurring-toggle:has(input:checked) {
    background: linear-gradient(135deg, #2dd4bf, #667eea);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(45,212,191,0.35);
}
[data-dc-view="create-campaign"] .dc-recurring-help {
    display: block;
    margin-top: 10px;
    color: #475569;
    line-height: 1.5;
}

/* CAPTCHA callout */
[data-dc-view="create-campaign"] .dc-form-group:has(#dc-cCaptchaAnswer) {
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(244,114,182,0.10));
    border: 1px solid rgba(251,191,36,0.45);
    border-radius: 12px;
    padding: 16px 18px;
}
[data-dc-view="create-campaign"] #dc-cCaptchaQ {
    color: #b45309;
    font-weight: 700;
}

/* Primary submit button — bold gradient with lift */
[data-dc-view="create-campaign"] .dc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f472b6 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 13px 26px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(118,75,162,0.30);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
[data-dc-view="create-campaign"] .dc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(118,75,162,0.38);
    filter: brightness(1.05);
}

[data-dc-view="create-campaign"] .dc-btn-edit {
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 6px 14px rgba(249,115,22,0.25);
}
[data-dc-view="create-campaign"] .dc-btn-delete {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 6px 14px rgba(239,68,68,0.25);
}

/* Stack the header neatly when the container has narrower padding on small screens. */
@media (max-width: 600px) {
    [data-dc-view="create-campaign"] .dc-header {
        padding: 32px clamp(16px, 5vw, 28px) 24px;
        margin-top: -20px;
        margin-bottom: 24px;
    }
    [data-dc-view="create-campaign"] .dc-header h1 { font-size: 1.7em; }
}

/* ---------- Search bar (campaigns + NGOs lists) ---------- */
.dc-search-bar {
    position: relative;
    max-width: 720px;
    margin: 0 auto 18px;
    padding: 0 4px;
}
.dc-search-input {
    width: 100%;
    padding: 14px 44px 14px 20px;
    font-size: 1.02em;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15,23,42,0.06);
    transition: border-color .15s ease, box-shadow .15s ease;
    outline: none;
}
.dc-search-input::-webkit-search-cancel-button { display: none; }
.dc-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.18), 0 6px 18px rgba(15,23,42,0.06);
}
.dc-search-clear {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.dc-search-clear:hover {
    background: #d1d5db;
    color: #111827;
}

/* ---- NGO tag chips ---- */
.dc-tag-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #eef2ff 0%, #fef3c7 100%);
    color: #3730a3;
    border: 1px solid #c7d2fe;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
}
.dc-tag-chip-md {
    padding: 6px 12px;
    font-size: 13px;
}
.dc-tag-chip-sm {
    padding: 4px 10px;
    font-size: 11.5px;
}
.dc-tag-chip-row {
    line-height: 1.4;
}

/* ---- Generic two-column form row (used on list-NGO and similar forms) ---- */
.dc-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}
.dc-form-row > .dc-form-group {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    margin-bottom: 0;
}
.dc-form-row > .dc-form-group input,
.dc-form-row > .dc-form-group select,
.dc-form-row > .dc-form-group textarea {
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 540px) {
    .dc-form-row > .dc-form-group { flex: 1 1 100%; }
}

/* Quad row: NGO Address + Location + Tags + Photos on one line on wide screens. */
.dc-form-row-quad > .dc-form-group {
    flex: 1 1 calc(25% - 12px);
    min-width: 0;
}
.dc-form-row-quad > .dc-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
@media (max-width: 1100px) {
    .dc-form-row-quad > .dc-form-group { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 540px) {
    .dc-form-row-quad > .dc-form-group { flex: 1 1 100%; }
}

/* Served + Staff (compact) + Address (wider) on one line. */
.dc-form-row-served {
    align-items: flex-start;
    position: relative;
}
.dc-form-row-served > .dc-form-group-served,
.dc-form-row-served > .dc-form-group-staff {
    flex: 0 1 180px;
    min-width: 0;
}
.dc-form-row-served > .dc-form-group-served > label,
.dc-form-row-served > .dc-form-group-staff > label {
    white-space: nowrap;
}
.dc-form-row-served > .dc-form-group-served {
    margin-left: 0;
}
.dc-form-row-served > .dc-form-group-staff {
    /* Center horizontally within the row, independent of Served/Address widths. */
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    margin: 0;
    width: 180px;
}
.dc-form-row-served > .dc-form-group-address {
    flex: 0 1 420px;
    min-width: 0;
    margin-left: auto;
}
.dc-form-row-served > .dc-form-group-address textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
@media (max-width: 760px) {
    .dc-form-row-served > .dc-form-group { flex: 1 1 100%; }
    .dc-form-row-served > .dc-form-group-served,
    .dc-form-row-served > .dc-form-group-staff { flex: 1 1 calc(50% - 8px); }
    .dc-form-row-served > .dc-form-group-staff {
        position: static;
        transform: none;
        width: auto;
    }
}
@media (max-width: 480px) {
    /* Keep "people it serves" and "Staff People" side-by-side on phones. */
    .dc-form-row-served { flex-wrap: wrap; gap: 10px; }
    .dc-form-row-served > .dc-form-group-served,
    .dc-form-row-served > .dc-form-group-staff {
        flex: 1 1 calc(50% - 5px);
        max-width: calc(50% - 5px);
        min-width: 0;
        margin: 0;
    }
    .dc-form-row-served > .dc-form-group-served > label,
    .dc-form-row-served > .dc-form-group-staff > label { white-space: normal; }
    .dc-form-row-served > .dc-form-group-served input,
    .dc-form-row-served > .dc-form-group-staff input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 8px;
        padding-right: 8px;
    }
    .dc-form-row-served > .dc-form-group-address { flex: 1 1 100%; max-width: 100%; }
}

/* Trio row: Location + Tags + Photos on one line. */
.dc-form-row-trio > .dc-form-group {
    flex: 1 1 calc(33.333% - 12px);
    min-width: 0;
}
/* Compact "Photos" field: smaller input than Location/Tags; label keeps default size. */
.dc-form-group-photos-compact {
    position: relative;
    left: 90px;
}
.dc-form-group-photos-compact > input[type="file"] {
    font-size: 12px;
    max-width: 240px;
    width: 100%;
    box-sizing: border-box;
}
.dc-form-group-photos-compact > small {
    font-size: 11px;
}
@media (max-width: 900px) {
    .dc-form-row-trio > .dc-form-group { flex: 1 1 calc(50% - 8px); }
    /* Drop the desktop-only 90px offset so the Photos field aligns flush
       with the other fields when the row stacks. */
    .dc-form-group-photos-compact { left: 0; }
    .dc-form-group-photos-compact > input[type="file"] { max-width: 100%; }
}
@media (max-width: 540px) {
    .dc-form-row-trio > .dc-form-group { flex: 1 1 100%; }
    .dc-form-group-photos-compact { position: static; left: auto; }
}

/* Monthly/Daily requirement item rows: shrink the Qty and Unit (kg/gram/…)
   controls on phones so the Item name input keeps a usable width. */
@media (max-width: 540px) {
    .dc-item-row { gap: 3px !important; flex-wrap: nowrap !important; }
    .dc-item-row .dc-nir-name {
        flex: 1 1 auto !important;
        min-width: 0;
        width: 100%;
        padding-left: 6px; padding-right: 6px;
        font-size: 0.92em;
    }
    .dc-item-row .dc-nir-qty  {
        flex: 0 0 34px !important; min-width: 0; width: 34px;
        padding-left: 2px; padding-right: 0;
        font-size: 0.7em;
        text-align: center;
    }
    .dc-item-row .dc-nir-unit {
        flex: 0 0 40px !important; min-width: 0; width: 40px;
        padding-left: 2px; padding-right: 8px;
        font-size: 0.7em;
        background-position: right 1px center;
    }
    .dc-item-row .dc-nir-remove {
        flex: 0 0 auto;
        padding: 0 6px;
        min-width: 0;
        font-size: 0.95em;
    }
}


/* -------------------------------------------------------------------------
 * Hide the theme's auto-rendered post title on pages whose post_content is
 * one of our shortcode-driven listing/landing/form views (they ship their own
 * hero/headline). Uses :has() so it only triggers when our shortcode actually
 * rendered something on the page.
 */
body:has([data-dc-view]) .wp-block-post-title,
body:has(.dc-listing)   .wp-block-post-title,
body:has(.dc-landing)   .wp-block-post-title,
body:has(.dc-list-ngo)  .wp-block-post-title {
    display: none !important;
}

/* -------------------------------------------------------------------------
 * About Us / generic content pages:
 *  - widen the column so paragraphs can breathe instead of looking centered
 *    in a narrow column
 *  - left-align body text (h2 stays default-aligned via the theme)
 */
body.page-id-2 .wp-block-post-content,
body.page-id-2 .entry-content {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    text-align: left;
}
body.page-id-2 .wp-block-post-content > *,
body.page-id-2 .entry-content > * {
    max-width: none;
    text-align: left;
}
body.page-id-2 .wp-block-post-content p,
body.page-id-2 .entry-content p,
body.page-id-2 .wp-block-post-content ul,
body.page-id-2 .entry-content ul {
    line-height: 1.7;
    font-size: 17px;
}
body.page-id-2 .wp-block-post-content h2,
body.page-id-2 .entry-content h2 {
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

/* Recently added strip (home page) */
.dc-recent-strip {
    margin: 0 0 36px;
    padding: 0;
}
.dc-recent-strip-head { padding: 0 4px 12px; }
.dc-recent-strip-head h2 {
    margin: 0 0 4px;
    font-size: 1.4em;
    font-weight: 800;
    line-height: 1.2;
}
/* Two separate rows: campaigns above, NGOs below. */
.dc-recent-row {
    margin-bottom: 16px;
}
.dc-recent-row:last-child { margin-bottom: 0; }
.dc-recent-row-label {
    padding: 0 4px 8px;
    font-size: 0.95em;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.01em;
}
.dc-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.dc-marquee-track {
    display: flex;
    gap: 14px;
    width: max-content;
    animation: dc-marquee-scroll 40s linear infinite;
    will-change: transform;
}
.dc-marquee-reverse .dc-marquee-track {
    animation-direction: reverse;
}
.dc-marquee:hover .dc-marquee-track,
.dc-marquee:focus-within .dc-marquee-track {
    animation-play-state: paused;
}
@keyframes dc-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .dc-marquee-track { animation: none; }
    .dc-marquee { overflow-x: auto; }
}
.dc-marquee-card {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dc-marquee-card:hover,
.dc-marquee-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}
.dc-marquee-thumb {
    display: block;
    width: 100%;
    height: 200px;
    background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
}
.dc-marquee-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}
.dc-marquee-badge {
    align-self: flex-start;
    display: inline-block;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
}
.dc-marquee-badge-ngo { background: #ecfdf5; color: #065f46; }
.dc-marquee-badge-campaign { background: #fff7ed; color: #9a3412; }
.dc-marquee-title {
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1.3;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 640px) {
    .dc-marquee-card { flex: 0 0 260px; }
    .dc-marquee-thumb { height: 160px; }
    .dc-marquee-title { font-size: 1em; }
}
