/* ================================================
   Madrasah Dawatul Haq — Public Website CSS
   Islamic Green + Gold Palette | Mobile First
   ================================================ */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
    --green:       #1a472a;
    --green-mid:   #2d6a4f;
    --green-light: #f0fdf4;
    --gold:        #c9a227;
    --gold-light:  #fdf6dc;
    --white:       #ffffff;
    --gray-50:     #f9fafb;
    --gray-100:    #f3f4f6;
    --gray-300:    #d1d5db;
    --gray-500:    #6b7280;
    --gray-700:    #374151;
    --red:         #c0392b;
    --radius:      12px;
    --shadow:      0 2px 12px rgba(0,0,0,0.08);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--gray-700);
    background: #fff;
    line-height: 1.6;
}

a { color: var(--green); }

/* ── Container ─────────────────────────────── */
.pub-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Nav ────────────────────────────────────── */
.pub-nav {
    background: var(--green);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.pub-nav .pub-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}
.pub-logo {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pub-logo span { color: var(--gold); }
.nav-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: none;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-links a:hover,
.nav-links a.active { background: rgba(255,255,255,0.15); color: #fff; }

/* ── Hero ───────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 60%, #1b5e2e 100%);
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}
.hero-title {
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 6px;
    direction: rtl;
}
.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.hero-tagline {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 28px;
}
.btn-hero {
    display: inline-block;
    background: var(--gold);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(201,162,39,0.4);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,162,39,0.5); }

/* ── Page Hero (inner pages) ────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}
.page-hero h1 { font-size: 1.6rem; margin-bottom: 6px; }
.page-hero p { opacity: 0.85; font-size: 0.9rem; }

/* ── Stats ──────────────────────────────────── */
.stats-section { background: var(--green); padding: 0; }
.stats-row {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 8px;
}
.stat-pill {
    text-align: center;
    padding: 10px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    min-width: 80px;
}
.stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
}
.stat-lbl {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Sections ───────────────────────────────── */
.pub-section { padding: 32px 0; }

.section-header {
    text-align: center;
    margin-bottom: 24px;
}
.section-header h2 { font-size: 1.3rem; color: var(--green); }
.section-header p { font-size: 0.85rem; color: var(--gray-500); margin-top: 4px; }

/* ── Content Cards ──────────────────────────── */
.content-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
}
.content-card h2 { font-size: 1.1rem; color: var(--green); margin-bottom: 12px; }

.prose p { font-size: 0.9rem; line-height: 1.8; color: var(--gray-700); }

/* ── Info Grid ──────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-box {
    background: var(--green-light);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.info-icon { font-size: 1.6rem; margin-bottom: 6px; }
.info-value { font-size: 1.3rem; font-weight: 800; color: var(--green); }
.info-label { font-size: 0.75rem; color: var(--gray-500); margin-top: 2px; }

/* ── Detail Rows ────────────────────────────── */
.detail-rows {}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    gap: 12px;
}
.detail-label { font-size: 0.82rem; color: var(--gray-500); flex-shrink: 0; }
.detail-value { font-size: 0.9rem; font-weight: 500; text-align: right; }

/* ── Campaign Cards ─────────────────────────── */
.campaigns-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

.campaign-card, .campaign-card-full {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    transition: transform 0.2s;
}
.campaign-card:hover { transform: translateY(-2px); }

.campaign-card { padding: 16px; }
.campaign-card-header { padding: 16px 16px 0; }

.campaign-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.campaign-type-badge.construction { background: #fff3cd; color: #856404; }
.campaign-type-badge.operational  { background: var(--green-light); color: var(--green); }
.campaign-type-badge.special      { background: #e8d5f5; color: #6f42c1; }

.campaign-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.campaign-desc  { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 12px; }

.campaign-amounts {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}
.amount-value { font-size: 0.95rem; font-weight: 700; }
.amount-lbl   { font-size: 0.7rem; color: var(--gray-500); margin-top: 2px; }

/* ── Progress Bar ───────────────────────────── */
.pub-progress-bar {
    background: var(--gray-100);
    border-radius: 100px;
    height: 10px;
    overflow: hidden;
}
.pub-progress-fill {
    background: linear-gradient(90deg, var(--green), var(--green-mid));
    height: 100%;
    border-radius: 100px;
    transition: width 0.5s ease;
}

/* ── Donate Buttons ─────────────────────────── */
.donate-btn {
    display: inline-block;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 12px;
    transition: background 0.2s, transform 0.2s;
}
.donate-btn:hover { background: var(--green-mid); transform: translateY(-1px); color: #fff; }
.btn-block-pub { display: block; text-align: center; width: 100%; }

.btn-outline {
    display: inline-block;
    border: 2px solid var(--green);
    color: var(--green);
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-outline:hover { background: var(--green); color: #fff; }

/* ── Forms (Public) ─────────────────────────── */
.pub-form-group { margin-bottom: 14px; }
.pub-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--gray-700); }
.pub-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.pub-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(26,71,42,0.1); }
.pub-error { color: var(--red); font-size: 0.78rem; margin-top: 4px; }

.quick-amount-btn {
    background: var(--green-light);
    color: var(--green);
    border: 1.5px solid var(--green);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-amount-btn:hover { background: var(--green); color: #fff; }

.payment-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.payment-opt.selected, .payment-opt:hover { border-color: var(--green); background: var(--green-light); }
.payment-opt small { color: var(--gray-500); font-size: 0.75rem; }

/* ── Alerts ─────────────────────────────────── */
.pub-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.pub-alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.pub-alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Gallery ────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; aspect-ratio: 1; }
.gallery-item img { width:100%; height:100%; object-fit:cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.5); color: #fff;
    font-size: 0.7rem; padding: 4px 6px; text-align: center;
}

/* ── About Brief ────────────────────────────── */
.about-brief { background: var(--green-light); padding: 32px 0; }
.about-brief-grid { display: grid; gap: 24px; }
.about-brief-text h2 { font-size: 1.2rem; color: var(--green); margin-bottom: 10px; }
.about-brief-text p { font-size: 0.88rem; color: var(--gray-700); line-height: 1.7; }
.about-brief-highlights { display: flex; flex-direction: column; gap: 8px; }
.highlight-item {
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── CTA Section ────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, var(--green), var(--green-mid));
    color: #fff;
    padding: 48px 0;
    text-align: center;
}
.cta-section h2 { font-size: 1.2rem; margin-bottom: 10px; }
.cta-section p  { opacity: 0.85; font-size: 0.9rem; }

/* ── WhatsApp Button ────────────────────────── */
.whatsapp-btn {
    display: inline-block;
    background: #25d366;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
}

/* ── Footer ─────────────────────────────────── */
.pub-footer {
    background: #0f2d1a;
    color: rgba(255,255,255,0.8);
    padding: 40px 0 20px;
    font-size: 0.85rem;
}
.footer-grid { display: grid; gap: 24px; margin-bottom: 28px; }
.footer-grid h4 { color: var(--gold); margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid p  { font-size: 0.82rem; line-height: 1.6; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-grid ul a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.82rem; }
.footer-grid ul a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; text-align: center; font-size: 0.78rem; opacity: 0.6; }

/* ── Tablet+ (640px+) ────────────────────────── */
@media (min-width: 640px) {
    .hero-title { font-size: 2.8rem; }
    .campaigns-grid { grid-template-columns: repeat(2, 1fr); }
    .about-brief-grid { grid-template-columns: 1.5fr 1fr; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .info-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Mobile Nav ──────────────────────────────── */
@media (max-width: 640px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        background: var(--green);
        padding: 10px 16px 16px;
        gap: 2px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 10px; display: block; }
    .pub-nav { position: relative; }
}
