:root {
  --green: #0f8a45;
  --green-dark: #08562b;
  --green-light: #e8f5ee;
  --gold: #f7b500;
  --ink: #1d2a22;
  --muted: #5f6f66;
  --line: #dfe8e2;
  --bg: #ffffff;
  --bg-soft: #f5f9f6;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(8, 86, 43, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Poppins', system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.urdu { font-family: 'Noto Nastaliq Urdu', serif; direction: rtl; }

/* Top bar */
.topbar { background: #03170b; color: #cfe3d6; font-size: 12.5px; border-bottom: 1px solid rgba(247,181,0,.25); }
.topbar-inner { display: flex; gap: 22px; align-items: center; min-height: 38px; flex-wrap: wrap; }
.topbar-label { color: var(--gold); letter-spacing: 2.5px; text-transform: uppercase; font-weight: 600; font-size: 11px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar .motto { font-size: 13px; color: #e8d7a0; }
.topbar-fb { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.topbar-fb:hover { background: var(--gold); color: #03170b; }

/* Header */
.site-header { background: #fff; border-bottom: 3px solid var(--green); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-logo { width: 56px; height: 76px; object-fit: contain; }
.brand-fallback { width: 62px; height: 62px; }
.brand-fallback { display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 14px; }
.brand-text strong { display: block; font-size: 18px; color: var(--green-dark); }
.brand-text small { display: block; text-align: left; font-size: 13px; color: var(--green); line-height: 2; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { padding: 8px 12px; border-radius: 6px; font-weight: 500; font-size: 15px; color: var(--ink); }
.main-nav a:hover, .main-nav a.active { background: var(--green-light); color: var(--green-dark); }
.nav-toggle { display: none; background: var(--green); color: #fff; border: 0; border-radius: 6px; font-size: 22px; width: 44px; height: 40px; cursor: pointer; }

/* Hero */
.hero { background: linear-gradient(120deg, var(--green-dark), var(--green)); color: #fff; padding: 72px 0; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.06); }
.hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); }
.hero .urdu-title { font-size: clamp(22px, 3vw, 32px); color: #ffe9a3; margin-bottom: 14px; line-height: 2.1; }
.hero p { font-size: 17px; color: #e4f4ea; max-width: 600px; }
.hero-logo { background: #fff; border-radius: 18px; padding: 20px; width: min(290px, 100%); aspect-ratio: 1112 / 1600; margin-left: auto; display: grid; place-items: center; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.hero-logo img { max-height: 100%; object-fit: contain; }
.hero-logo .brand-fallback { width: 100%; height: 100%; font-size: 48px; }

.btn { display: inline-block; padding: 11px 24px; border-radius: 8px; font-weight: 600; border: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 15px; transition: .2s; }
.btn-gold { background: var(--gold); color: #1d1a0c; }
.btn-gold:hover { background: #d49a00; color: #000; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--green-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Sections */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); color: var(--green-dark); }
.section-head h2::after { content: ""; display: block; width: 60px; height: 3px; background: var(--gold); margin: 12px auto 0; border-radius: 2px; }
.section-head p { color: var(--muted); }

.page-banner { background: linear-gradient(120deg, var(--green-dark), var(--green)); color: #fff; padding: 46px 0; }
.page-banner h1 { margin: 0; font-size: clamp(24px, 3.5vw, 36px); }
.breadcrumb { font-size: 14px; color: #cfe9d9; margin-top: 6px; }
.breadcrumb a { color: #fff; }

/* Values */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow); }
.value .urdu { font-size: 28px; color: var(--green); line-height: 2; }
.value h3 { font-size: 18px; }
.value p { color: var(--muted); margin: 0; font-size: 15px; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-img { aspect-ratio: 16/10; background: var(--green-light); object-fit: cover; width: 100%; }
.card-img.placeholder { display: grid; place-items: center; color: var(--green); font-weight: 700; font-size: 22px; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 18px; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--green); }
.card-body p { color: var(--muted); font-size: 15px; flex: 1; }
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.tag { background: var(--green-light); color: var(--green-dark); padding: 2px 10px; border-radius: 20px; font-weight: 600; font-size: 12px; }

/* Events */
.event { display: flex; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.event-date { flex: 0 0 76px; height: 82px; background: var(--green); color: #fff; border-radius: 8px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.event-date b { font-size: 28px; line-height: 1; }
.event-date span { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.event h3 { font-size: 18px; margin-bottom: 4px; }
.event p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.events-list { display: grid; gap: 18px; }

/* Members */
.member { text-align: center; padding: 26px 18px; }
.member-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 4px solid var(--green-light); background: var(--green-light); display: grid; place-items: center; font-size: 36px; font-weight: 700; color: var(--green); }
.member h3 { font-size: 17px; margin-bottom: 2px; }
.member .role { color: var(--green); font-weight: 600; font-size: 14px; }
.member .org { color: var(--muted); font-size: 13px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery a { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; display: block; }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.05); }
.gallery span { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: 14px; }
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 100; padding: 16px; cursor: zoom-out; }
#lightbox.show { display: flex; }
#lightbox img { max-height: 85vh; border-radius: 6px; }
#lightbox p { color: #fff; margin-top: 10px; }

/* About */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-logo { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 30px; display: grid; place-items: center; }
.about-logo img { max-height: 380px; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #fff; background: var(--green); width: 20px; height: 20px; border-radius: 50%; font-size: 12px; display: grid; place-items: center; margin-top: 4px; }

/* Article */
.article { max-width: 820px; margin: 0 auto; }
.article img.cover { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.article .content { font-size: 17px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-weight: 500; font-size: 14px; display: block; margin-bottom: 6px; }
input, textarea, select { width: 100%; padding: 11px 14px; border: 1px solid #cdd9d1; border-radius: 8px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,138,69,.15); }
textarea { min-height: 140px; resize: vertical; }
.contact-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; }
.contact-info { background: var(--green-dark); color: #e4f4ea; border-radius: var(--radius); padding: 30px; }
.contact-info h3 { color: #fff; }
.contact-info p { margin: 0 0 18px; }
.contact-info b { color: var(--gold); display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 15px; }
.alert-success { background: #e3f6ea; color: #0b5d2e; border: 1px solid #b8e3c7; }
.alert-error { background: #fdecec; color: #8a1c1c; border: 1px solid #f3c2c2; }

.empty { text-align: center; color: var(--muted); padding: 30px; background: var(--bg-soft); border-radius: var(--radius); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span { padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }
.center { text-align: center; margin-top: 32px; }

/* CTA */
.cta { background: var(--gold); color: #1d1a0c; padding: 46px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta h2 { margin: 0; }

/* Footer */
.site-footer { background: #0a2e1a; color: #b9d3c3; padding-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 30px; }
.footer-qr .qr-card { position: relative; width: 150px; padding: 10px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 2px var(--gold-2, #f7b500), 0 12px 28px rgba(0,0,0,.35); }
.footer-qr #site-qr svg { display: block; width: 100%; height: auto; }
.footer-qr #site-qr svg path, .footer-qr #site-qr svg rect[fill="black"] { fill: #064a27; }
.footer-qr .qr-logo { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; object-fit: contain; transform: translate(-50%, -50%); background: #fff; padding: 2px; border-radius: 4px; }
.footer-qr .qr-hint { margin: 10px 0 0; font-size: 12.5px; opacity: .8; }
.site-footer h4 { color: #fff; font-size: 17px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b9d3c3; }
.site-footer a:hover { color: var(--gold); }
.motto-lg { font-size: 20px; color: var(--gold); line-height: 2.2; text-align: left; }
.social { display: flex; gap: 10px; }
.social a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.social a:hover { background: var(--green); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding: 18px 16px; text-align: center; font-size: 14px; }

/* Responsive */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; padding: 10px 16px 16px; border-bottom: 3px solid var(--green); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
  .main-nav.open { display: flex; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
}
@media (max-width: 760px) {
  .hero { padding: 48px 0; }
  .hero-grid, .two-col, .contact-wrap, .footer-grid, .values { grid-template-columns: 1fr; }
  .hero-logo { margin: 0 auto; width: 220px; }
  .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .topbar .motto { margin-left: 0; }
  .brand-text strong { font-size: 15px; }
  .brand-logo { width: 50px; height: 50px; }
  .section { padding: 46px 0; }
}
