:root {
    --green:        #16a34a;
    --green-dark:   #15803d;
    --green-deeper: #14532d;
    --green-light:  #dcfce7;
    --green-50:     #f0fdf4;
    --white:        #ffffff;
    --text:         #1e293b;
    --text-muted:   #64748b;
    --border:       #e2e8f0;
    --bg:           #f8fafc;
}

/* ── Base ─────────────────────────────────────────── */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); background: var(--bg); margin: 0; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: none; }

/* ── Buttons ──────────────────────────────────────── */
.btn-primary  { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; border-radius: 8px; transition: background .2s; }
.btn-primary:hover, .btn-primary:focus { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-outline-primary { color: var(--green); border-color: var(--green); border-radius: 8px; font-weight: 600; background: transparent; }
.btn-outline-primary:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ── Navbar ───────────────────────────────────────── */
.navbar-merciva { background: var(--green); box-shadow: 0 2px 10px rgba(0,0,0,.15); padding: .75rem 0; }
.navbar-merciva .navbar-brand { color: #fff !important; font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: .4rem; }
.navbar-merciva .nav-link { color: rgba(255,255,255,.88) !important; font-weight: 500; padding: .45rem .85rem !important; border-radius: 6px; transition: background .15s; }
.navbar-merciva .nav-link:hover { background: rgba(255,255,255,.12); color: #fff !important; }
.navbar-merciva .nav-link.active { color: #fff !important; background: rgba(255,255,255,.18); font-weight: 600; }
.navbar-merciva .btn-donate { background: #fff; color: var(--green); font-weight: 700; border-radius: 50px; padding: .4rem 1.2rem; border: none; transition: transform .15s; }
.navbar-merciva .btn-donate:hover { transform: scale(1.04); background: var(--green-light); }
.navbar-merciva .navbar-toggler { border-color: rgba(255,255,255,.4); }
.navbar-merciva .navbar-toggler-icon { filter: invert(1); }

/* ── Hero ─────────────────────────────────────────── */
.hero-section { background: linear-gradient(150deg, var(--green) 0%, var(--green-deeper) 100%); color: #fff; padding: 6rem 0; text-align: center; }
.hero-section h1 { font-size: 2.9rem; font-weight: 800; line-height: 1.2; }
.hero-section p  { font-size: 1.1rem; opacity: .88; max-width: 560px; margin: 0 auto; }
.hero-badge { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.35); padding: .3rem .9rem; border-radius: 50px; font-size: .8rem; font-weight: 600; display: inline-block; margin-bottom: .75rem; }
.btn-hero-primary  { background: #fff; color: var(--green); font-weight: 700; border-radius: 50px; padding: .75rem 2rem; border: none; font-size: 1rem; transition: transform .15s; }
.btn-hero-primary:hover { transform: scale(1.03); color: var(--green-dark); }
.btn-hero-outline  { border: 2px solid rgba(255,255,255,.7); color: #fff; font-weight: 600; border-radius: 50px; padding: .75rem 2rem; background: transparent; font-size: 1rem; transition: background .15s; }
.btn-hero-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── Stats Bar ────────────────────────────────────── */
.stats-bar { background: var(--green-deeper); padding: 1.6rem 0; }
.stats-bar .stat-value { font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1; }
.stats-bar .stat-label { font-size: .82rem; color: rgba(255,255,255,.7); margin-top: .25rem; }
.stats-bar .stat-divider { width: 1px; background: rgba(255,255,255,.15); }

/* ── Section Title ────────────────────────────────── */
.section-title { font-size: 1.9rem; font-weight: 800; color: var(--green-deeper); }
.section-title::after { content: ''; display: block; width: 50px; height: 4px; background: var(--green); border-radius: 2px; margin: .5rem auto 0; }

/* ── Cause Cards ──────────────────────────────────── */
.cause-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem 1.5rem; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: transform .2s, box-shadow .2s; }
.cause-card:hover { transform: translateY(-6px); box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.cause-card .cause-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.cause-card h5 { color: var(--green-dark); font-weight: 700; font-size: 1.1rem; }
.cause-card p  { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

/* ── Cards ────────────────────────────────────────── */
.card-merciva { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); overflow: hidden; }
.card-merciva .card-header { background: var(--green); color: #fff; font-weight: 700; border: none; padding: .9rem 1.4rem; font-size: .95rem; }
.card-merciva .card-header.dark { background: var(--green-deep); }

/* ── Forms ────────────────────────────────────────── */
.form-control:focus, .form-select:focus { border-color: var(--green); box-shadow: 0 0 0 .2rem rgba(22,163,74,.18); }
.form-label { font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: .35rem; }

/* ── Banner Slider ────────────────────────────────── */
.banner-slider .carousel-item img { height: 460px; object-fit: cover; width: 100%; }
.banner-slider .carousel-caption { background: linear-gradient(to top, rgba(0,0,0,.65), transparent); bottom: 0; left: 0; right: 0; padding: 2rem; text-align: left; border-radius: 0; }
.carousel-control-prev, .carousel-control-next { width: 4%; }

/* ── Gallery ──────────────────────────────────────── */
.gallery-grid { column-count: 3; column-gap: 1rem; }
.gallery-item { break-inside: avoid; margin-bottom: 1rem; border-radius: 12px; overflow: hidden; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.gallery-item img { width: 100%; display: block; transition: transform .3s; min-height: 180px; object-fit: cover; }
.gallery-item:hover img { transform: scale(1.04); }
@media (max-width: 768px) { .gallery-grid { column-count: 2; } }
@media (max-width: 480px) { .gallery-grid { column-count: 1; } }

/* ── Videos ───────────────────────────────────────── */
.video-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.07); cursor: pointer; transition: box-shadow .2s, transform .2s; }
.video-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.13); transform: translateY(-4px); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #0f0f0f; overflow: hidden; }
.video-thumb video { width: 100%; height: 100%; object-fit: cover; opacity: .65; }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.play-btn span { width: 54px; height: 54px; background: rgba(255,255,255,.92); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; padding-left: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.video-title { padding: .75rem 1rem; font-weight: 600; font-size: .88rem; color: var(--text); background: #fff; }

/* ── Footer ───────────────────────────────────────── */
.footer-merciva { background: var(--green-deeper); color: rgba(255,255,255,.8); padding: 3rem 0 0; }
.footer-merciva h5 { color: #fff; font-weight: 800; }
.footer-merciva h6 { color: rgba(255,255,255,.5); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: .72rem; margin-bottom: .9rem; }
.footer-merciva a { color: rgba(255,255,255,.65); transition: color .2s; }
.footer-merciva a:hover { color: #fff; }
.footer-merciva li { margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2.5rem; padding: 1rem 0; text-align: center; font-size: .8rem; color: rgba(255,255,255,.35); }

/* ── Page Header ──────────────────────────────────── */
.page-header { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff; padding: 2.2rem 0; }
.page-header h2 { font-weight: 800; margin: 0; }
.page-header p  { opacity: .82; margin: .35rem 0 0; font-size: .95rem; }

/* ── CTA ──────────────────────────────────────────── */
.cta-section { background: var(--green-50); border-top: 3px solid var(--green-light); padding: 4.5rem 0; text-align: center; }

/* ════════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════════ */

/* Sidebar */
.admin-sidebar { width: 250px; background: var(--green-deeper); min-height: 100vh; position: fixed; top: 0; left: 0; z-index: 200; display: flex; flex-direction: column; }
.admin-brand { padding: 1.3rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-brand-name { color: #fff; font-weight: 800; font-size: 1rem; }
.admin-brand-sub  { color: rgba(255,255,255,.4); font-size: .7rem; margin-top: .1rem; }

.admin-nav { flex: 1; overflow-y: auto; padding: .75rem 0; }
.admin-nav .nav-section { padding: .6rem 1.4rem .2rem; font-size: .65rem; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.3); font-weight: 700; }
.admin-nav .nav-link { color: rgba(255,255,255,.72); padding: .62rem 1.4rem; display: flex; align-items: center; gap: .65rem; font-size: .875rem; font-weight: 500; border-left: 3px solid transparent; transition: background .15s, color .15s; }
.admin-nav .nav-link:hover  { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav .nav-link.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: #fff; font-weight: 600; }
.admin-nav .nav-icon { width: 18px; text-align: center; font-size: .95rem; }

.admin-footer-links { padding: 1rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: .5rem; }
.admin-footer-links .btn { font-size: .82rem; padding: .45rem .75rem; border-radius: 8px; }

/* Main */
.admin-main { margin-left: 250px; min-height: 100vh; background: #f1f5f9; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; padding: .85rem 1.6rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.admin-topbar h5 { margin: 0; font-weight: 700; color: var(--text); font-size: .97rem; }
.admin-topbar .user-chip { background: var(--green-50); color: var(--green-dark); padding: .3rem .75rem; border-radius: 50px; font-size: .8rem; font-weight: 600; }
.admin-content { padding: 1.6rem; flex: 1; }

/* Stat Cards */
.stat-card { border-radius: 14px; padding: 1.4rem 1.5rem; color: #fff; position: relative; overflow: hidden; }
.stat-card .stat-num  { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-card .stat-lbl  { font-size: .82rem; opacity: .82; margin-top: .3rem; }
.stat-card .stat-icon { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 3rem; opacity: .15; }
.stat-card.green  { background: linear-gradient(135deg, #16a34a, #15803d); }
.stat-card.dark   { background: linear-gradient(135deg, #14532d, #166534); }
.stat-card.teal   { background: linear-gradient(135deg, #0d9488, #0f766e); }
.stat-card.slate  { background: linear-gradient(135deg, #475569, #334155); }

/* Tables */
.table-merciva thead th { background: var(--green-50); color: var(--green-deeper); font-weight: 700; border-bottom: 2px solid var(--green-light); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; padding: .85rem 1rem; }
.table-merciva tbody td { padding: .75rem 1rem; vertical-align: middle; border-color: #f1f5f9; }
.table-merciva tbody tr:hover { background: var(--green-50); }

/* Badges */
.badge-active   { background: #dcfce7; color: #15803d; padding: .28em .72em; border-radius: 50px; font-size: .74rem; font-weight: 700; display: inline-block; }
.badge-inactive { background: #fee2e2; color: #b91c1c; padding: .28em .72em; border-radius: 50px; font-size: .74rem; font-weight: 700; display: inline-block; }
.badge-cash     { background: var(--green-light); color: var(--green-deeper); padding: .28em .72em; border-radius: 50px; font-size: .74rem; font-weight: 700; display: inline-block; }

/* Upload */
.upload-box { border: 2px dashed #cbd5e1; border-radius: 14px; padding: 2.2rem; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.upload-box:hover { border-color: var(--green); background: var(--green-50); }
.upload-box .upload-icon { font-size: 2.5rem; color: var(--green); margin-bottom: .4rem; }

/* Lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 1rem; }
.lightbox-overlay.show { display: flex; }
.lightbox-overlay img, .lightbox-overlay video { max-height: 88vh; max-width: 92vw; border-radius: 10px; }
.lightbox-close { position: absolute; top: 1rem; right: 1.5rem; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; line-height: 1; }

/* Alert */
.alert-success { background: #dcfce7; border-color: #bbf7d0; color: #15803d; border-radius: 10px; }
.alert-warning  { background: #fef9c3; border-color: #fde68a; color: #92400e; border-radius: 10px; }
.alert-danger   { background: #fee2e2; border-color: #fecaca; color: #b91c1c; border-radius: 10px; }

/* Utilities */
.fw-600 { font-weight: 600; }
.rounded-xl { border-radius: 14px !important; }
.text-green  { color: var(--green-dark) !important; }
.bg-green-50 { background: var(--green-50) !important; }

/* ══════════════════════════════════════════
   HOMEPAGE REDESIGN
══════════════════════════════════════════ */

/* Hero Fullscreen */
.hero-fullscreen { width: 100%; height: 100vh; min-height: 600px; position: relative; overflow: hidden; }
.hero-slide { width: 100%; height: 100%; background-size: cover; background-position: center; position: relative; display: flex; align-items: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(20,83,45,.82) 0%, rgba(21,128,61,.55) 100%); }
.hero-content { position: relative; z-index: 2; padding: 0 2rem; max-width: 700px; margin-left: 8vw; }
.hero-badge-pill { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.35); padding: .35rem 1.1rem; border-radius: 50px; font-size: .8rem; font-weight: 600; display: inline-block; margin-bottom: 1.2rem; letter-spacing: .5px; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; color: #fff; line-height: 1.15; margin-bottom: 1.2rem; }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.88); max-width: 520px; line-height: 1.7; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero-primary { background: #fff; color: var(--green-dark); font-weight: 700; border-radius: 50px; padding: .8rem 2.2rem; border: none; font-size: 1rem; transition: transform .15s, box-shadow .15s; display: inline-block; text-decoration: none; }
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); color: var(--green-dark); }
.btn-hero-outline { border: 2px solid rgba(255,255,255,.75); color: #fff; font-weight: 600; border-radius: 50px; padding: .8rem 2.2rem; background: transparent; font-size: 1rem; transition: background .15s; display: inline-block; text-decoration: none; }
.btn-hero-outline:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Tagline Strip */
.tagline-strip { background: var(--green); padding: .9rem 0; text-align: center; display: flex; align-items: center; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.tagline-strip .urdu { color: #fff; font-size: 1.25rem; font-weight: 700; font-family: 'Segoe UI', sans-serif; direction: rtl; }
.tagline-strip .divider { color: rgba(255,255,255,.4); font-size: 1.5rem; }
.tagline-strip .eng { color: rgba(255,255,255,.9); font-size: 1rem; letter-spacing: 1.5px; font-style: italic; }

/* Stats Section */
.stats-section { background: var(--green-deeper); }
.stat-box { padding: 2rem 1rem; text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.stat-box:last-child { border-right: none; }
.stat-box .stat-num { font-size: 2.4rem; font-weight: 900; color: #fff; line-height: 1; }
.stat-box .stat-lbl { font-size: .82rem; color: rgba(255,255,255,.65); margin-top: .3rem; letter-spacing: .5px; text-transform: uppercase; }

/* Section Headings */
.section-eyebrow { color: var(--green); font-weight: 700; font-size: .85rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: .5rem; }
.section-heading  { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; color: var(--text); line-height: 1.2; margin-bottom: 1rem; }
.section-body     { color: var(--text-muted); line-height: 1.8; font-size: 1.02rem; margin-bottom: 1.5rem; }

/* About Split */
.about-img-grid { position: relative; }
.about-img-grid .img-main  { width: 80%; border-radius: 16px; object-fit: cover; aspect-ratio: 4/3; display: block; box-shadow: 0 20px 50px rgba(0,0,0,.15); }
.about-img-grid .img-small { width: 48%; border-radius: 12px; object-fit: cover; aspect-ratio: 1/1; position: absolute; bottom: -2rem; right: 0; border: 4px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.5rem 0; }
.feature-item { display: flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 600; color: var(--text); }
.feat-icon { font-size: 1.2rem; }
.btn-green-pill { display: inline-block; background: var(--green); color: #fff; font-weight: 700; border-radius: 50px; padding: .75rem 2rem; font-size: .95rem; text-decoration: none; transition: background .15s, transform .15s; }
.btn-green-pill:hover { background: var(--green-dark); color: #fff; transform: translateY(-2px); }

/* Causes Cards */
.cause-card-new { background: #fff; border-radius: 16px; padding: 2rem 1.5rem; box-shadow: 0 4px 20px rgba(0,0,0,.07); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; gap: .75rem; }
.cause-card-new:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.13); }
.cause-icon-wrap { font-size: 2.4rem; width: 64px; height: 64px; background: var(--green-50); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.cause-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 0; }
.cause-desc  { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin: 0; flex: 1; }
.cause-progress { margin-top: auto; }
.btn-cause-donate { display: block; text-align: center; background: var(--green); color: #fff; font-weight: 700; border-radius: 50px; padding: .6rem 1rem; font-size: .875rem; text-decoration: none; margin-top: 1rem; transition: background .15s; }
.btn-cause-donate:hover { background: var(--green-dark); color: #fff; }

/* How It Works */
.how-step { padding: 2.5rem 2rem; border-radius: 16px; background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.07); height: 100%; transition: transform .2s; }
.how-step:hover, .how-step.active { background: var(--green); transform: translateY(-4px); }
.how-step:hover .how-num, .how-step.active .how-num { color: rgba(255,255,255,.5); }
.how-step:hover h5, .how-step.active h5 { color: #fff; }
.how-step:hover p,  .how-step.active p  { color: rgba(255,255,255,.8) !important; }
.how-num { font-size: 3rem; font-weight: 900; color: var(--green-light); line-height: 1; margin-bottom: .75rem; }
.how-step h5 { font-weight: 700; margin-bottom: .5rem; }

/* Masonry Gallery */
.masonry-grid { columns: 4; column-gap: 1rem; }
.masonry-item { break-inside: avoid; margin-bottom: 1rem; border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; }
.masonry-item img { width: 100%; display: block; transition: transform .3s; }
.masonry-item:hover img { transform: scale(1.05); }
.masonry-overlay { position: absolute; inset: 0; background: rgba(20,83,45,.45); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; font-size: 2rem; }
.masonry-item:hover .masonry-overlay { opacity: 1; }
@media (max-width: 992px) { .masonry-grid { columns: 3; } }
@media (max-width: 768px) { .masonry-grid { columns: 2; } .hero-content { margin-left: 1.5rem; } .about-img-grid .img-small { display: none; } .about-img-grid .img-main { width: 100%; } }
@media (max-width: 480px) { .masonry-grid { columns: 1; } }

/* Video Cards */
.video-card-new { position: relative; border-radius: 14px; overflow: hidden; cursor: pointer; aspect-ratio: 16/9; background: #000; }
.video-card-new video { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.video-play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); transition: transform .2s; }
.video-card-new:hover .video-play-btn { transform: scale(1.15); }
.video-label { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; padding: 1.5rem 1rem .75rem; font-size: .875rem; font-weight: 600; }

/* CTA Banner */
.cta-banner { position: relative; }
.cta-bg { background-size: cover; background-position: center; padding: 6rem 0; position: relative; }
.cta-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(20,83,45,.88), rgba(21,128,61,.75)); }
.cta-title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; color: #fff; margin-bottom: 1rem; }
.cta-sub   { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 500px; margin: 0 auto 2rem; line-height: 1.7; }
