/* ============================================================
   CrowdFund UG — Main Stylesheet
   Bootstrap 4.6 base + custom components
   ============================================================ */


/* ── Root Variables ───────────────────────────────────────── */

:root {
    --cf-primary: #0d6efd;
    --cf-secondary: #6c757d;
    --cf-success: #28a745;
    --cf-warning: #ffc107;
    --cf-danger: #dc3545;
    --cf-mtn-yellow: #ffc107;
    --cf-airtel-red: #e30613;
    --cf-dark: #1e2a38;
    --cf-body-bg: #f4f6f9;
    --cf-card-radius: 12px;
    --cf-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    --cf-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}


/* ── Base ─────────────────────────────────────────────────── */

body {
    font-family: var(--cf-font);
    color: #333;
    background: #fff;
}

a {
    color: var(--cf-primary);
}

a:hover {
    text-decoration: none;
}


/* ── Navbar ───────────────────────────────────────────────── */

.cf-navbar {
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
    padding: .6rem 1.5rem;
}

.cf-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--cf-primary);
    letter-spacing: -.5px;
}

.cf-brand span {
    color: var(--cf-warning);
}

.nav-avatar {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--cf-primary);
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    font-size: .65rem;
    padding: 2px 5px;
    border-radius: 10px;
}


/* ── Hero Section ─────────────────────────────────────────── */

.cf-hero {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 60%, #6610f2 100%);
    color: #fff;
    padding: 90px 0 60px;
    position: relative;
    overflow: hidden;
}

.cf-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    clip-path: ellipse(55% 100% at 50% 100%);
}

.cf-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.cf-hero .lead {
    font-size: 1.15rem;
    opacity: .9;
}

.cf-hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.cf-hero-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.cf-hero-stat span {
    font-size: .85rem;
    opacity: .8;
}


/* ── Section Headings ─────────────────────────────────────── */

.cf-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.cf-section-subtitle {
    color: var(--cf-secondary);
}


/* ── Campaign Card ────────────────────────────────────────── */

.cf-campaign-card {
    border: none;
    border-radius: var(--cf-card-radius);
    box-shadow: var(--cf-shadow);
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
    height: 100%;
}

.cf-campaign-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
}

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

.cf-card-desc {
    font-size: .87rem;
    color: var(--cf-secondary);
    margin: .4rem 0 .9rem;
    /* 3 line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-overflow: hidden;
    overflow: hidden;
}


/* ── Progress Bar ─────────────────────────────────────────── */

.cf-progress {
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    overflow: hidden;
}

.cf-progress-bar {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width .6s ease;
}


/* ── Campaign Browse / Filter Sidebar ────────────────────── */

.cf-filter-sidebar .card {
    border-radius: var(--cf-card-radius);
    border: none;
    box-shadow: var(--cf-shadow);
}

.cf-filter-sidebar .card-header {
    background: transparent;
    font-weight: 700;
    border-bottom: 1px solid #f0f0f0;
}


/* ── Campaign View (full page) ───────────────────────────── */

.cf-campaign-hero {
    height: 380px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--cf-card-radius);
}

.cf-campaign-tabs .nav-link {
    color: var(--cf-secondary);
    font-weight: 600;
    padding: .6rem 1.2rem;
    border-radius: 0;
}

.cf-campaign-tabs .nav-link.active {
    color: var(--cf-primary);
    border-bottom: 3px solid var(--cf-primary);
    background: transparent;
}


/* Gallery thumbnails */

.cf-gallery img {
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity .2s;
}

.cf-gallery img:hover {
    opacity: .8;
}


/* Tier Selection */

.cf-tier-option {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    margin-bottom: 10px;
}

.cf-tier-option:hover {
    border-color: var(--cf-primary);
}

.cf-tier-option.selected {
    border-color: var(--cf-primary);
    background: rgba(13, 110, 253, .05);
}


/* ── Pledge Page ──────────────────────────────────────────── */

.cf-pledge-card {
    border-radius: var(--cf-card-radius);
    box-shadow: var(--cf-shadow);
    border: none;
}

.cf-payment-box {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.cf-payment-box.mtn-box:hover,
.cf-payment-box.mtn-box.active {
    border-color: var(--cf-mtn-yellow);
    background: rgba(255, 193, 7, .05);
}

.cf-payment-box.airtel-box:hover,
.cf-payment-box.airtel-box.active {
    border-color: var(--cf-airtel-red);
    background: rgba(227, 6, 19, .05);
}

.cf-payment-box img {
    height: 36px;
    margin-bottom: 6px;
}


/* ── Auth Pages ───────────────────────────────────────────── */

.cf-auth-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, .1);
    max-width: 480px;
    margin: auto;
}

.cf-auth-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cf-primary), #6610f2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
}


/* Password strength bar */

.password-strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}


/* ── How It Works Steps ───────────────────────────────────── */

.cf-steps {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cf-step {
    flex: 1;
    min-width: 180px;
    text-align: center;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--cf-card-radius);
    box-shadow: var(--cf-shadow);
}

.cf-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cf-primary);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .9rem;
}


/* ── Category Cards ───────────────────────────────────────── */

.cf-category-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--cf-card-radius);
    background: #fff;
    box-shadow: var(--cf-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s;
    display: block;
}

.cf-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    color: inherit;
}

.cf-category-icon {
    font-size: 2rem;
    margin-bottom: .6rem;
}


/* ── Creator Layout ───────────────────────────────────────── */

.cf-creator-layout {
    display: flex;
    min-height: calc(100vh - 60px);
    background: var(--cf-body-bg);
}

.cf-creator-sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e9ecef;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.cf-creator-main {
    flex: 1;
    min-width: 0;
}

.cf-creator-topbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: .6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* Sidebar nav */

.cf-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cf-nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .65rem 1.2rem;
    color: #555;
    font-size: .88rem;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}

.cf-nav-item a:hover {
    background: #f0f4ff;
    color: var(--cf-primary);
}

.cf-nav-item a.active {
    background: #e8f0fe;
    color: var(--cf-primary);
    border-left-color: var(--cf-primary);
    font-weight: 600;
}

.cf-nav-item .fas,
.cf-nav-item .far {
    width: 18px;
    text-align: center;
    opacity: .7;
}

.cf-nav-badge {
    margin-left: auto;
    font-size: .7rem;
    padding: 2px 7px;
}


/* ── Stat Cards ───────────────────────────────────────────── */

.cf-stat-card {
    background: #fff;
    border-radius: var(--cf-card-radius);
    box-shadow: var(--cf-shadow);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cf-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.cf-stat-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cf-secondary);
    margin: 0;
}

.cf-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}


/* ── Upload Placeholder ───────────────────────────────────── */

.cf-upload-placeholder {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
}

.cf-upload-placeholder:hover {
    border-color: var(--cf-primary);
}


/* ── Notification Timeline ────────────────────────────────── */

.cf-notif-unread {
    background: #f0f6ff;
    border-color: var(--cf-primary) !important;
}


/* ── Payment Badges (footer) ──────────────────────────────── */

.cf-payment-badge {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: .3rem .7rem;
    font-size: .8rem;
    gap: .4rem;
    margin: .25rem;
}


/* ── Footer ───────────────────────────────────────────────── */

.cf-footer {
    background: var(--cf-dark);
    color: #a8b8cc;
}

.cf-footer a {
    color: #a8b8cc;
}

.cf-footer a:hover {
    color: #fff;
}

.cf-footer .footer-brand {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}


/* ── Soft colour utilities ────────────────────────────────── */

.bg-info-soft {
    background: rgba(23, 162, 184, .08) !important;
}

.bg-success-soft {
    background: rgba(40, 167, 69, .08) !important;
}

.bg-warning-soft {
    background: rgba(255, 193, 7, .08) !important;
}

.bg-danger-soft {
    background: rgba(220, 53, 69, .08) !important;
}


/* ── Badges small ─────────────────────────────────────────── */

.badge-xs {
    font-size: .65rem;
    padding: 2px 6px;
}


/* ── Misc helpers ─────────────────────────────────────────── */

.font-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.x-small {
    font-size: .72rem;
}

.opacity-25 {
    opacity: .25;
}

.gap-1 {
    gap: .25rem;
}


/* ── Responsive Adjustments ───────────────────────────────── */

@media (max-width: 991.98px) {
    .cf-hero h1 {
        font-size: 1.9rem;
    }
    .cf-creator-sidebar {
        width: 200px;
    }
}

@media (max-width: 767.98px) {
    .cf-hero {
        padding: 60px 0 40px;
    }
    .cf-hero h1 {
        font-size: 1.6rem;
    }
    .cf-hero-stats {
        flex-direction: column;
        gap: .8rem;
    }
    .cf-creator-layout {
        flex-direction: column;
    }
    .cf-creator-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    .cf-sidebar-nav {
        display: flex;
        overflow-x: auto;
    }
    .cf-nav-item a {
        white-space: nowrap;
    }
}