/* ============================================================
   Aid For Uganda – Main Stylesheet
   Bootstrap 5 is loaded from CDN. This file adds custom styles.
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --green:      #2d7a4f;
    --green-dark: #1e5438;
    --green-light:#4aad75;
    --gold:       #c9a84c;
    --gold-light: #e8c96a;
    --cream:      #fdf8f0;
    --earthy:     #8b6914;
    --text-dark:  #1a1a2e;
    --text-muted: #6c757d;
    --white:      #ffffff;
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.16);
    --radius:     12px;
    --radius-lg:  20px;
}

/* ---------- Base ---------- */
body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: #ffffff;
    line-height: 1.7;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

h1,h2,h3,h4,h5,h6 {
    font-weight: 700;
    line-height: 1.3;
}

/* ---------- Utility Classes ---------- */
.text-green  { color: var(--green) !important; }
.text-gold   { color: var(--gold) !important; }
.bg-green    { background-color: var(--green) !important; }
.bg-green-dark { background-color: var(--green-dark) !important; }
.bg-cream    { background-color: var(--cream) !important; }
.btn-green   { background-color: var(--green); color: #fff; border: none; }
.btn-green:hover { background-color: var(--green-dark); color: #fff; }
.btn-gold    { background-color: var(--gold); color: #fff; border: none; }
.btn-gold:hover { background-color: var(--earthy); color: #fff; }
.btn-outline-green { border: 2px solid var(--green); color: var(--green); background: transparent; }
.btn-outline-green:hover { background: var(--green); color: #fff; }

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}
.section-title span { color: var(--green); }
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 14px 0;
    transition: all .3s ease;
}
.navbar-brand img { height: 46px; }
.navbar-brand span {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -0.5px;
}
.nav-link {
    font-weight: 600;
    color: var(--text-dark) !important;
    padding: 6px 14px !important;
    border-radius: 6px;
    transition: all .2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--green) !important;
    background: rgba(45,122,79,0.08);
}
.navbar .btn {
    font-weight: 700;
    padding: 8px 22px;
    border-radius: 25px;
}

/* ---------- Emergency Banner ---------- */
.emergency-banner {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 600;
}
.emergency-banner a { color: #ffe; text-decoration: underline; }

/* ---------- Hero Section ---------- */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e5438 0%, #2d7a4f 50%, #4aad75 100%);
}
.hero-section .hero-bg {
    position: absolute;
    inset: 0;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.25;
}
.hero-section .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30,84,56,0.55) 0%, rgba(45,122,79,0.35) 100%);
}
.hero-section .hero-content { position: relative; z-index: 2; }
.hero-section h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-section p.lead {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.9);
    max-width: 580px;
}
.hero-stat {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 14px 10px;
    text-align: center;
    color: #fff;
}
.hero-stat .number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold-light);
    display: block;
}
.hero-stat .label {
    font-size: 0.78rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}
.btn-hero-primary {
    background: var(--gold);
    color: #fff;
    border: none;
    padding: 16px 36px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(201,168,76,0.4);
    transition: all .3s;
}
.btn-hero-primary:hover {
    background: var(--gold-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201,168,76,0.5);
}
.btn-hero-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.7);
    padding: 14px 34px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all .3s;
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

/* ---------- Cause Cards ---------- */
.cause-card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s, box-shadow .3s;
    height: 100%;
    background: #fff;
}
.cause-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.cause-card .card-img-top {
    height: 210px;
    object-fit: cover;
    width: 100%;
}
.cause-card .img-placeholder {
    height: 210px;
    background: linear-gradient(135deg, var(--green), var(--green-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.6);
}
.cause-card .card-body { padding: 22px; }
.cause-card .cause-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--green);
    background: rgba(45,122,79,0.1);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}
.cause-card h5 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.cause-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }

.progress-wrap { margin-bottom: 10px; }
.progress { height: 8px; border-radius: 4px; background: #e9ecef; }
.progress-bar {
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 4px;
}
.progress-stats { display: flex; justify-content: space-between; font-size: 0.8rem; }
.progress-stats .raised { font-weight: 800; color: var(--green); }
.progress-stats .goal { color: var(--text-muted); }

.btn-donate-card {
    background: var(--green);
    color: #fff;
    border: none;
    width: 100%;
    padding: 12px;
    font-weight: 700;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all .2s;
    display: block;
    text-align: center;
}
.btn-donate-card:hover {
    background: var(--green-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* ---------- Impact Stats ---------- */
.impact-section {
    background:
        linear-gradient(135deg, rgba(27,74,49,0.65), rgba(45,122,79,0.55)),
        url('/assets/images/impact-bg.png') center/cover no-repeat;
    color: #fff;
    padding: 70px 0;
}
.impact-stat {
    text-align: center;
    padding: 20px;
}
.impact-stat .number {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    color: var(--gold-light);
    display: block;
    line-height: 1;
}
.impact-stat .label {
    font-size: 0.95rem;
    opacity: 0.88;
    margin-top: 6px;
    font-weight: 600;
}
.impact-stat .icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.7;
}

/* ---------- Where Your Donation Goes ---------- */
.donation-goes-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--radius);
    background: var(--cream);
    border: 1px solid rgba(45,122,79,0.1);
    transition: all .3s;
}
.donation-goes-card:hover {
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.donation-goes-card .icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--green), var(--green-light));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
    color: #fff;
}
.donation-goes-card h5 { font-weight: 800; color: var(--text-dark); margin-bottom: 8px; }
.donation-goes-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }

/* ---------- Faith Section ---------- */
.faith-section {
    background: linear-gradient(135deg, var(--cream), #fff);
    border-left: 6px solid var(--gold);
    border-radius: var(--radius);
    padding: 40px;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.8;
    position: relative;
}
.faith-section::before {
    content: '\201C';
    position: absolute;
    top: 10px; left: 20px;
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.3;
    font-style: normal;
    line-height: 1;
}
.faith-section .source {
    font-size: 0.9rem;
    font-style: normal;
    color: var(--gold);
    font-weight: 700;
    margin-top: 16px;
    display: block;
}

/* ---------- Donation Form ---------- */
.donate-section { background: var(--cream); }
.donate-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}
.amount-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    color: var(--text-dark);
    font-weight: 700;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    transition: all .2s;
    cursor: pointer;
    font-size: 1rem;
}
.amount-btn:hover, .amount-btn.active {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}
.frequency-tabs .nav-link {
    font-weight: 700;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted) !important;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-bottom: none;
    padding: 10px 24px;
}
.frequency-tabs .nav-link.active {
    background: var(--green) !important;
    color: #fff !important;
    border-color: var(--green);
}
.form-control:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(45,122,79,0.12);
}
.btn-submit-donation {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 10px;
    width: 100%;
    transition: all .3s;
    box-shadow: 0 4px 20px rgba(45,122,79,0.3);
}
.btn-submit-donation:hover {
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(45,122,79,0.4);
}

/* ---------- Volunteer Section ---------- */
.volunteer-section {
    background:
        linear-gradient(135deg, rgba(30,84,56,0.72), rgba(45,122,79,0.62)),
        url('/assets/images/volunteer-bg.png') center/cover no-repeat;
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.volunteer-section h2 { color: #fff; font-weight: 900; }
.volunteer-section p { color: rgba(255,255,255,0.88); font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}
.contact-info-item .icon {
    width: 46px; height: 46px;
    background: rgba(45,122,79,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--green);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.contact-info-item .info h6 { font-weight: 700; margin-bottom: 2px; }
.contact-info-item .info p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Footer ---------- */
footer.site-footer {
    background: #0f2d1f;
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}
footer.site-footer h5 {
    color: #fff;
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
footer.site-footer a {
    color: rgba(255,255,255,0.7);
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: color .2s;
}
footer.site-footer a:hover { color: var(--gold-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}
.footer-brand h4 {
    color: var(--gold-light);
    font-weight: 900;
    font-size: 1.4rem;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.6; }
.social-link {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    transition: background .2s;
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.9rem;
}
.social-link:hover { background: var(--green); color: #fff !important; }

/* ---------- Page Header ---------- */
.page-header {
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    color: #fff;
    padding: 70px 0 50px;
}
.page-header h1 { color: #fff; font-size: 2.4rem; }
.page-header .breadcrumb-item,
.page-header .breadcrumb-item a,
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.75); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* ---------- Success / Cancel Pages ---------- */
.success-card {
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
    padding: 50px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.success-icon {
    width: 90px; height: 90px;
    background: rgba(45,122,79,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    color: var(--green);
}

/* ---------- Admin ---------- */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: #0f2d1f;
    flex-shrink: 0;
}
.admin-sidebar .brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar .brand h4 {
    color: var(--gold-light);
    font-weight: 900;
    margin: 0;
    font-size: 1.1rem;
}
.admin-sidebar .brand span { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.72) !important;
    padding: 11px 20px !important;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all .2s;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.07);
    border-left-color: var(--gold-light);
}
.admin-sidebar .nav-section {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    padding: 16px 20px 6px;
    font-weight: 700;
}
.admin-content { flex: 1; background: #f4f7f5; min-height: 100vh; }
.admin-topbar {
    background: #fff;
    padding: 14px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.stat-card h3 { font-size: 1.7rem; font-weight: 900; margin: 0; }
.stat-card p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.admin-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    background: #f8f9fa;
}
.badge-status-completed   { background: #d4edda; color: #155724; }
.badge-status-pending     { background: #fff3cd; color: #856404; }
.badge-status-failed      { background: #f8d7da; color: #721c24; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-section { min-height: 100svh; padding: 100px 0 60px; }
    .hero-section h1 { font-size: 2rem; }
    .donate-card { padding: 24px; }
    .faith-section { padding: 26px; }
    .admin-sidebar { width: 100%; min-height: auto; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .6s ease forwards; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
