:root {
    --green: #149B68;
    --green-dark: #0f7d52;
    --green-light: #EAF7F2;
    --blue: #1C83BD;
    --blue-light: #E8F2FA;
    --turquoise: #0E9A9A;
    --white: #FFFFFF;
    --eggshell: #FFFEF9;
    --eggshell-bg: #F5F3EE;
    --gray: #F8FAFC;
    --gray-200: #E2E8F0;
    --text: #1E293B;
    --muted: #64748B;
    --line: #E2E8F0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08),0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08),0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Tahoma", "IBM Plex Sans Arabic", Arial, sans-serif;
    color: var(--text);
    background: var(--eggshell-bg);
    line-height: 1.8;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px clamp(16px, 4vw, 72px);
    background: rgba(255, 254, 249, 0.95);
    border-bottom: 2px solid var(--line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.95rem; line-height: 1.3; }
.brand small { color: var(--muted); font-size: 0.78rem; }

.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.main-nav a:hover { color: var(--green); background: var(--green-light); border-radius: 8px; }

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--white);
    background: var(--green);
    font-weight: 700;
    cursor: pointer;
}

/* Ad Banner */
.ad-banner-section {
    display: flex;
    justify-content: center;
    padding: 16px clamp(16px, 4vw, 72px) 0;
}

.ad-banner-link {
    display: block;
}

.ad-banner-img {
    width: 720px;
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--line);
}

.ad-banner-placeholder {
    width: 720px;
    max-width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--eggshell);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.ad-banner-placeholder span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--muted);
    opacity: 0.4;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .ad-banner-img,
    .ad-banner-placeholder {
        height: auto;
        min-height: 140px;
        max-height: 180px;
    }
}

/* Action Band */
.action-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 20px clamp(16px, 4vw, 72px);
    background: var(--eggshell);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
    align-items: center;
    gap: clamp(26px, 4vw, 58px);
    padding: clamp(34px, 6vw, 76px) clamp(16px, 4vw, 72px) 32px;
    background: linear-gradient(135deg, rgba(20, 155, 104, 0.08), rgba(28, 131, 189, 0.06)), var(--eggshell);
}

.hero h1, .section h2, .split-section h2, .info-grid h2, .social-band h2 {
    margin: 0 0 14px;
    line-height: 1.25;
}

.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); max-width: 900px; font-weight: 900; letter-spacing: -0.5px; }

.hero p { margin: 0; color: var(--muted); font-size: clamp(0.95rem, 1.5vw, 1.15rem); }

.eyebrow {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Panel */
.progress-panel {
    padding: clamp(22px, 3vw, 34px);
    background: var(--eggshell);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.amount-primary span { display: block; color: var(--muted); font-weight: 800; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }

.amount-primary strong {
    display: block;
    margin-top: 6px;
    color: var(--green);
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 1.05;
    font-weight: 900;
}

.latest-donation-time {
    display: block;
    font-size: 1.05rem;
    color: #16a34a;
    font-weight: 600;
    margin-top: 8px;
    padding: 6px 14px;
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: default;
}
.latest-donation-time:hover {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgba(22, 163, 74, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}
[dir="rtl"] .latest-donation-time {
    font-family: 'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
}

.decimal-small {
    font-size: 0.5em;
    opacity: 0.75;
    font-weight: 600;
    vertical-align: baseline;
}

.progress-track {
    overflow: hidden;
    height: clamp(30px, 4vw, 44px);
    margin: 16px 0 8px;
    border-radius: 999px;
    background: #E8F5EE;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.progress-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16a34a, #22c55e, #4ade80);
    transition: width 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.6);
    position: relative;
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.progress-track > span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.08) 100%);
    border-radius: 999px 999px 0 0;
}

.progress-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--turquoise), var(--blue));
    transition: width 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 10px rgba(20, 155, 104, 0.5);
    position: relative;
}

.progress-track > span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.08) 100%);
    border-radius: 999px 999px 0 0;
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.progress-markers {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    margin-top: 4px;
}

.progress-markers span {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
    white-space: nowrap;
    position: relative;
}

.progress-markers span::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 5px;
    background: var(--muted);
    border-radius: 1px;
}

.progress-percentage {
    text-align: center;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 900;
    color: var(--green);
    margin-bottom: 4px;
}

.stats-grid, .source-grid, .gallery-grid, .account-grid, .video-grid {
    display: grid;
    gap: 14px;
}

.stats-grid { grid-template-columns: repeat(3, 1fr); }

.stats-grid article, .source-card, .account-card, .media-card, .info-grid article, .faq-list details {
    background: #FFFEF9;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.stats-grid article { padding: 16px; background: var(--eggshell); border: 2px solid var(--line); box-shadow: var(--shadow-md); border-radius: var(--radius); }

.stats-grid span, .source-card span { display: block; color: var(--muted); font-size: 0.85rem; }

.stats-grid strong {
    display: block;
    margin-top: 5px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 900;
    color: var(--text);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.button.primary { background: var(--green); color: var(--white); }
.button.primary:hover { background: var(--green-dark); }
.button.blue { background: #6c3b5e; color: var(--white); }
.button.blue:hover { background: #5a3050; }
.button.bahja { background: #22c55e; color: var(--white); }
.button.bahja:hover { background: #16a34a; }
.button.whatsapp { background: var(--turquoise); color: var(--white); }
.button.whatsapp:hover { background: #0b7e7e; }
.button.outline { border-color: var(--green); color: var(--green); background: var(--white); }
.button.outline:hover { background: var(--green-light); }

/* Sections */
.section, .split-section, .info-grid, .social-band {
    padding: clamp(30px, 5vw, 64px) clamp(16px, 4vw, 72px);
}

.section-heading { max-width: 700px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 3px solid var(--green); }

.section h2, .split-section h2, .info-grid h2, .social-band h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.3;
    color: var(--text);
}

.source-grid { grid-template-columns: repeat(3, 1fr); }
.source-card { padding: 20px; background: var(--eggshell); border: 2px solid var(--line); box-shadow: var(--shadow-md); border-radius: var(--radius); }
.source-card h3, .source-card strong, .account-card h3, .media-card h3 { margin: 0; font-weight: 900; }

.source-card strong {
    display: block;
    margin: 12px 0 4px;
    color: var(--blue);
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    line-height: 1.15;
    font-weight: 900;
}

/* Split Section */
.split-section {
    display: grid;
    grid-template-columns: 1fr 340px;
    align-items: center;
    gap: 28px;
    background: var(--eggshell);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.split-section p, .info-grid p, .media-card p, .account-card p, .faq-list p {
    color: var(--muted);
    font-size: 0.92rem;
}

.image-frame {
    display: grid;
    place-items: center;
    min-height: 260px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #EAF7F2, #E8F2FA);
    border: 2px solid var(--line);
    box-shadow: var(--shadow-md);
}

.image-frame img { width: min(220px, 65%); }

/* Info Grid */
.info-grid { grid-template-columns: repeat(2, 1fr); }
.info-grid article { padding: 24px; border-radius: var(--radius); background: var(--eggshell); border: 2px solid var(--line); box-shadow: var(--shadow-md); }

/* FAQ */
.faq-list { display: grid; gap: 10px; }
.faq-list details { padding: 16px 18px; border-radius: var(--radius); background: var(--eggshell); border: 2px solid var(--line); box-shadow: var(--shadow-md); }
.faq-list summary { cursor: pointer; font-weight: 900; font-size: 1rem; color: var(--text); }

/* Media */
.media-section { background: var(--eggshell); border: 2px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.video-grid { grid-template-columns: repeat(2, 1fr); }

.video-grid article {
    overflow: hidden;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--eggshell);
    box-shadow: var(--shadow-md);
}

.video-grid iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.video-grid h3 { margin: 0; padding: 12px 14px; font-size: 1rem; font-weight: 900; }

.gallery-grid, .account-grid { grid-template-columns: repeat(3, 1fr); }
.media-card { overflow: hidden; background: var(--eggshell); border: 2px solid var(--line); box-shadow: var(--shadow-md); border-radius: var(--radius); }

.media-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #E8F2FA;
    display: block;
}

.media-card div { padding: 16px; }

.media-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.media-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 2px solid var(--green);
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.media-btn.download-btn {
    background: var(--green);
    color: var(--white);
}

.media-btn.download-btn:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.media-btn.share-card-btn {
    background: transparent;
    color: var(--green);
}

.media-btn.share-card-btn:hover {
    background: var(--green-light);
}

/* Account Card */
.account-card dl { display: grid; gap: 8px; margin: 12px 0; }
.account-card div { display: grid; gap: 2px; }
.account-card dt { color: var(--muted); font-size: 0.82rem; }
.account-card { background: var(--eggshell); border: 2px solid var(--line); box-shadow: var(--shadow-md); border-radius: var(--radius); padding: 16px; }

.account-card dd {
    margin: 0;
    direction: ltr;
    text-align: right;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 8px 16px;
    border: 2px solid var(--green);
    border-radius: 8px;
    background: transparent;
    color: var(--green);
    font-weight: 900;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover { background: var(--green-light); transform: translateY(-1px); }

.views-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 10px;
    margin-bottom: 16px;
}

.stats-bar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin-top: 24px;
    padding: 0;
    background: #fafffe;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    flex-wrap: nowrap !important;
}
.stats-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    transition: all 0.3s ease;
    cursor: default;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
    background: transparent;
}
.stats-bar-item:hover {
    background: #f8fafb;
}
.stats-bar-item + .stats-bar-item {
    border-right: 1px solid #e5e7eb;
}
.stats-bar-item i {
    color: #16a34a;
    font-size: 1.3em;
}
.sb-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.sb-num {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text);
    direction: ltr;
    line-height: 1;
}
.sb-label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}
.copy-btn.copied { background: var(--green); color: var(--white); border-color: var(--green); }

/* Social */
.social-band {
    color: var(--text);
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-md);
    margin-bottom: 0;
}

.social-band h2 {
    color: var(--text);
}

.social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.social-icons a {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--eggshell);
    color: var(--text);
    font-size: 1.2rem;
    transition: all 0.25s;
}

.social-icons a:hover {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(20,155,104,0.3);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    border: 2px solid var(--green);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--green);
    color: var(--white);
}

.share-btn:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn.whatsapp-share {
    background: #25D366;
    border-color: #25D366;
    color: var(--white);
}

.share-btn.whatsapp-share:hover {
    background: #1ebe5b;
    border-color: #1ebe5b;
}

/* Footer */
.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px;
    color: #fff;
    background: #1E293B;
    border-top: 2px solid #1E293B;
    text-align: center;
    font-size: 0.88rem;
}

.site-footer p { color: rgba(255, 255, 255, 0.9); margin: 0; font-weight: 600; }

.site-footer img {
    border-radius: 50%;
    background: var(--white);
    padding: 3px;
}

.empty-state {
    padding: 20px;
    color: var(--muted);
    background: var(--eggshell);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* Counter Animation */
.counter-animated {
    display: inline-block;
}

/* Responsive */
@media (max-width: 980px) {
    .hero, .split-section, .info-grid { grid-template-columns: 1fr; }
    .action-band, .source-grid, .gallery-grid, .account-grid { grid-template-columns: repeat(2, 1fr); }
    .split-section { background: var(--eggshell); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
}

@media (max-width: 740px) {
    .site-header { align-items: flex-start; }
    .menu-toggle { display: inline-flex; }

    .main-nav {
        position: absolute;
        inset: 100% 0 auto 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px 16px;
        background: var(--eggshell);
        border-bottom: 2px solid var(--line);
    }

    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 12px; }

    .hero { padding-top: 24px; }

    .stats-grid, .action-band, .source-grid, .gallery-grid, .account-grid, .video-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0;
        margin-top: 16px;
    }

    .stats-bar-item {
        padding: 14px 10px;
        gap: 6px;
    }

    .stats-bar-item + .stats-bar-item {
        border-right: 1px solid #e5e7eb;
        border-top: none;
        padding-top: 14px;
    }

    .stats-bar-item i {
        font-size: 1.1em;
    }

    .sb-num {
        font-size: 1.05rem;
    }

    .sb-label {
        font-size: 0.68rem;
    }

    .amount-primary strong {
        font-size: clamp(2rem, 12vw, 3.5rem);
    }

    .progress-markers span {
        font-size: 0.65rem;
    }
}
