:root {
    --wcc-primary: #1768b3;
    --wcc-primary-hover: #005FB8;
    --wcc-bg: #ffffff;
    --wcc-text: #1e293b;
    --wcc-text-muted: #64748b;
    --wcc-border: #f1f5f9;
    --wcc-radius: 16px;
    --wcc-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --wcc-button-font-size: 14px;
    --wcc-button-height: 46px;
    --wcc-button-padding: 9px 20px;
    --wcc-button-border-radius: 12px;
    --wcc-button-border-width: 2px
}

/* Campaign Discovery Page Styles */
.wcc-discovery-page {
    margin: 20px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wcc-campaign-id-header {
    text-transform: uppercase;
    font-weight: 500;
    font-size: 14px;
    color: var(--wcc-text-muted);
    margin-bottom: 10px;
}

/* Filter Bar */
.wcc-discovery-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.wcc-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.wcc-search-wrapper input {
    width: 100%;
    padding: 12px 40px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s;
}

.wcc-search-wrapper input:focus {
    border-color: #1768b3;
    outline: none;
}

.wcc-clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.wcc-clear-search:hover {
    color: #333;
}

.wcc-filter-controls select {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #f8fafc;
    cursor: pointer;
    font-weight: 500;
    color: var(--wcc-text);
    outline: none;
}

/* Grid Layout */
.wcc-discovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Campaign Card */
.wcc-campaign-card {
    background: #fff;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 0.3rem 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wcc-campaign-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.wcc-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wcc-campaign-card a:focus,
a:focus,
a.wcc-card-link:focus {
    outline: none !important;
    box-shadow: none !important;
    outline-color: transparent !important;
}

.wcc-card-image {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.wcc-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.badge-emergency {
    background: #e74c3c;
}

.badge-paused {
    background: #f39c12;
}

.badge-completed {
    background: #27ae60;
}

.badge-expired {
    background: #95a5a6;
}

.badge-funded {
    background: #1768b3;
}

.wcc-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wcc-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wcc-card-excerpt {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
    height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    padding-bottom: 15px;
}

/* Progress in Card */
.wcc-card-progress {
    margin-top: auto;
    border-top: 1px solid #ededed;
    padding-top: 15px;
}

.wcc-mini-progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 50px;
    margin-bottom: 10px;
    overflow: hidden;
}

.wcc-mini-progress-fill {
    height: 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    backface-visibility: hidden;
    contain: layout paint style;
}

.wcc-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
}

.wcc-stat-raised {
    color: #333;
}

.wcc-stat-percent {
    color: #333;
}

/* Donate Button */
.wcc-card-actions {
    padding: 0 20px 20px;
}

.wcc-donate-btn {
    height: var(--wcc-button-height);
    display: block;
    width: 100%;
    text-align: center;
    padding: var(--wcc-button-padding);
    background: linear-gradient(135deg, #1768b3, #12538f);
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(34, 105, 163, 0.25);
}

.wcc-donate-btn:hover {
    background: linear-gradient(135deg, #12538f, #0b3a67);
    box-shadow: 0 4px 12px rgba(34, 105, 163, 0.4);
    transform: translateY(-1px);
}

.wcc-donate-btn:active {
    transform: translateY(0);
}

/* Status & Load More */
.wcc-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
    justify-content: center;
    justify-items: center;
    align-items: center;
}


/* Category Filters Wrapper */
.wcc-discovery-categories {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--wcc-border);
    border-bottom: 1px solid var(--wcc-border);
    margin-bottom: 20px;
    gap: 15px;
}

.wcc-discovery-categories .wcc-scroll-hint {
    flex: 1;
    min-width: 0;
    /* Important for flex-child with overflow */
}

.wcc-categories-list {
    display: flex;
    gap: 20px;
    padding-inline-end: 40px;
    /* Force cut-off effect under gradient */
}

.wcc-filter-controls {
    flex-shrink: 0;
    margin-inline-start: auto;
}

.wcc-category-btn {
    border: none;
    background: transparent;
    padding: 9px 30px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    position: relative;
}

.wcc-category-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--wcc-primary);
    transform: scaleX(0);
    transition: transform 0.2s;
}

.wcc-category-btn:hover {
    color: var(--wcc-text);
}

.wcc-category-btn.active {
    color: var(--wcc-primary);
}

.wcc-category-btn.active::after {
    transform: scaleX(1);
}