/* =============================================
   fundraisers.css — Explore Fundraisers page
   Requires: style.css (shared vars + header/footer)
============================================= */

/* Active nav link */
.nav-link.active {
    color: var(--primary-color);
    background: rgba(89,136,107,0.08);
}

/* =============================================
   Page Hero
============================================= */
.page-hero {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1e4a4a 55%, #2a6060 100%);
    padding: 60px 2rem 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6,214,160,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(89,136,107,0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-hero .section-label {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.page-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 14px;
    line-height: 1.2;
}

.page-hero-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-counts {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 18px 0;
}

.hero-count-item {
    text-align: center;
    padding: 0 30px;
}

.count-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.count-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    white-space: nowrap;
}

.hero-count-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

/* =============================================
   Controls Bar
============================================= */
.controls-bar {
    background: var(--white);
    border-bottom: 2px solid var(--border-color);
    padding: 14px 0 10px;
    position: sticky;
    top: 65px;
    z-index: 900;
    box-shadow: 0 3px 14px rgba(0,0,0,0.06);
}

.controls-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.results-row {
    padding-top: 8px;
}

/* Search */
.search-wrap {
    position: relative;
    flex: 0 0 240px;
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 0.82rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 9px 34px 9px 36px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    color: var(--dark-color);
    background: var(--light-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(89,136,107,0.1);
}

.search-clear {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 0.78rem;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.search-clear.visible {
    display: flex;
}

/* Category chips */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    padding: 7px 15px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Sort + View toggle */
.sort-view-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 7px 16px;
    background: var(--light-color);
    transition: border-color 0.2s;
}

.sort-wrap:focus-within {
    border-color: var(--primary-color);
}

.sort-icon {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.sort-select {
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dark-color);
    cursor: pointer;
    outline: none;
}

.view-toggle {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
}

.view-btn {
    background: none;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    color: var(--gray);
    font-size: 0.85rem;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Results summary */
.results-summary {
    font-size: 0.82rem;
    color: var(--gray);
    font-weight: 500;
}

.results-summary strong {
    color: var(--primary-color);
}

/* =============================================
   Main / Grid
============================================= */
.fundraisers-main {
    padding: 36px 2rem 80px;
    background: var(--light-color);
    min-height: 60vh;
}

.fundraisers-inner {
    max-width: 1280px;
    margin: 0 auto;
}

/* Grid layout */
.fundraisers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

/* List layout override */
.fundraisers-grid.list-view {
    grid-template-columns: 1fr;
    gap: 14px;
}

/* =============================================
   Campaign Card — Grid
============================================= */
.fc-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0,0,0,0.07);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
    animation: cardIn 0.3s ease both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.13);
}

/* Thumbnail */
.fc-thumb {
    position: relative;
    height: 175px;
    overflow: hidden;
    flex-shrink: 0;
}

.fc-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    transition: transform 0.35s;
}

.fc-card:hover .fc-thumb-placeholder {
    transform: scale(1.06);
}

.fc-thumb-placeholder.green { background: linear-gradient(135deg, #e8f5ee, #c3e6d2); }
.fc-thumb-placeholder.blue  { background: linear-gradient(135deg, #e8f0ff, #c8d9ff); }
.fc-thumb-placeholder.peach { background: linear-gradient(135deg, #fff3e8, #ffdcc0); }
.fc-thumb-placeholder.teal  { background: linear-gradient(135deg, #e0f7f4, #aee8dc); }

.fc-pct-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(19,46,46,0.8);
    color: var(--secondary-color);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.fc-pct-badge.funded {
    background: rgba(6,214,160,0.9);
    color: var(--dark-color);
}

/* Card body */
.fc-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.fc-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    background: rgba(89,136,107,0.1);
    padding: 3px 10px;
    border-radius: 20px;
    align-self: flex-start;
}

.fc-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--dark-color);
    line-height: 1.45;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Progress bar */
.fc-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fc-progress {
    background: var(--light-color);
    height: 7px;
    border-radius: 10px;
    overflow: hidden;
}

.fc-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.fc-progress-fill.full {
    background: linear-gradient(90deg, #06d6a0, #00b886);
}

.fc-goal-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--gray);
}

/* Footer row */
.fc-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 2px;
    border-top: 1px solid var(--border-color);
}

.fc-raised {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.fc-raised-sub {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 3px;
}

.fc-supporters {
    text-align: right;
    font-size: 0.72rem;
    color: var(--gray);
    font-weight: 600;
}

.fc-supporters i {
    color: var(--primary-color);
    margin-right: 3px;
}

/* =============================================
   List View Overrides
============================================= */
.fundraisers-grid.list-view .fc-card {
    flex-direction: row;
    border-radius: 14px;
}

.fundraisers-grid.list-view .fc-thumb {
    width: 190px;
    height: auto;
    flex-shrink: 0;
    border-radius: 0;
}

.fundraisers-grid.list-view .fc-body {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 18px 22px;
}

.fundraisers-grid.list-view .fc-tag {
    order: 0;
    flex: 0 0 auto;
}

.fundraisers-grid.list-view .fc-title {
    order: 1;
    flex: 1 1 100%;
    -webkit-line-clamp: 1;
    font-size: 0.92rem;
}

.fundraisers-grid.list-view .fc-progress-wrap {
    order: 2;
    flex: 1 1 220px;
}

.fundraisers-grid.list-view .fc-footer {
    order: 3;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    border-top: none;
    gap: 4px;
    margin-top: 0;
    padding-top: 0;
}

/* =============================================
   No Results
============================================= */
.no-results {
    display: none;
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 16px;
    display: block;
}

.no-results h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.no-results p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.btn-reset {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-reset:hover {
    background: var(--dark-color);
    transform: translateY(-2px);
}

/* =============================================
   Responsive
============================================= */
@media (max-width: 1200px) {
    .fundraisers-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .fundraisers-grid { grid-template-columns: repeat(2, 1fr); }
    .search-wrap { flex: 0 0 200px; }
}

@media (max-width: 680px) {
    .page-hero-title { font-size: 2rem; }
    .hero-counts { flex-direction: column; padding: 16px 24px; gap: 0; }
    .hero-count-item { padding: 12px 0; }
    .hero-count-divider { width: 60px; height: 1px; }
    .fundraisers-grid { grid-template-columns: 1fr; }
    .controls-inner { flex-direction: column; align-items: stretch; gap: 10px; }
    .search-wrap { flex: 1 1 100%; }
    .sort-view-wrap { margin-left: 0; justify-content: space-between; }
    .fundraisers-grid.list-view .fc-card { flex-direction: column; }
    .fundraisers-grid.list-view .fc-thumb { width: 100%; height: 160px; }
    .fundraisers-grid.list-view .fc-body { flex-direction: column; }
    .controls-bar { top: 62px; }
}
