/* =========================================================
   arafah.css — Day of Arafah donation page
   Uses tokens from variables.css for full theme integration.
   ========================================================= */

.arafah-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 48px) 16px;
}

/* ---- Hero / Title ---- */
.arafah-hero {
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 48px);
}

.arafah-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(39, 114, 69, 0.10);
    color: var(--brand-green);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.arafah-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-green);
    animation: arafahPulse 1.6s ease-in-out infinite;
}

@keyframes arafahPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: .4; }
}

.arafah-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 1000;
    color: var(--brand-green);
    margin: 0 0 8px;
    letter-spacing: -.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .arafah-title {
    background: linear-gradient(135deg, var(--brand-green), var(--brand-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.arafah-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--muted);
    font-weight: 700;
    max-width: 640px;
    margin: 0 auto;
}

/* ---- Chart card ---- */
.arafah-chart-card {
    background: var(--card-bg-stack);
    border: var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: clamp(20px, 4vw, 40px);
    position: relative;
    overflow: hidden;
}

.arafah-chart-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(39, 114, 69, .08), transparent 50%),
                radial-gradient(circle at 80% 100%, rgba(180, 140, 100, .08), transparent 50%);
    pointer-events: none;
}

.arafah-chart-area {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

.arafah-chart-area.is-bar,
.arafah-chart-area.is-progress {
    aspect-ratio: auto;
    height: 220px;
    max-width: 720px;
}

.arafah-chart-area.is-gauge {
    aspect-ratio: 2 / 1.1;
}

/* Centered % overlay for doughnut/gauge */
.arafah-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
}

.arafah-chart-area.is-gauge .arafah-center {
    bottom: 10%;
    top: auto;
    height: 50%;
}

.arafah-center-percent {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 1000;
    color: var(--brand-green);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.arafah-center-label {
    font-size: 12px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

.arafah-chart-area.is-bar .arafah-center,
.arafah-chart-area.is-progress .arafah-center {
    display: none;
}

/* SVG progress bar / gauge inline */
.arafah-progress-bar {
    width: 100%;
    height: 36px;
    background: rgba(39, 114, 69, .10);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.arafah-progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-green), var(--brand-gold));
    width: 0%;
    transition: width 1.1s cubic-bezier(.25, .9, .25, 1);
    border-radius: var(--radius-pill);
    position: relative;
    overflow: hidden;
}

.arafah-progress-bar .fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: translateX(-100%);
    animation: arafahShine 2.4s infinite;
}

@keyframes arafahShine {
    100% { transform: translateX(100%); }
}

/* ---- Stats row ---- */
.arafah-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: clamp(20px, 3vw, 32px);
    position: relative;
}

.arafah-stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.arafah-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.arafah-stat-label {
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.arafah-stat-value {
    font-size: clamp(1.1rem, 2.4vw, 1.45rem);
    font-weight: 1000;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.arafah-stat-value.green { color: var(--brand-green); }
.arafah-stat-value.gold  { color: var(--brand-gold); }

/* Number flip animation when value updates */
.arafah-stat-value.flash {
    animation: arafahFlash .9s ease-out;
}

@keyframes arafahFlash {
    0%   { color: var(--brand-green); transform: scale(1); }
    35%  { color: var(--brand-gold);  transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* ---- CTA + live indicator ---- */
.arafah-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin-top: clamp(20px, 3vw, 32px);
}

.arafah-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-2));
    color: #fff;
    font-weight: 1000;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(39, 114, 69, .35);
    transition: all .25s ease;
    letter-spacing: .3px;
}

.arafah-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(39, 114, 69, .45);
    color: #fff;
}

.arafah-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
}

.arafah-live-tag .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-green);
    box-shadow: 0 0 0 0 rgba(39, 114, 69, .6);
    animation: arafahPulse 1.8s ease-in-out infinite;
}

/* ---- Fade-in on first paint ---- */
.arafah-fade-in {
    animation: arafahFadeUp .8s cubic-bezier(.25, .9, .25, 1) both;
}

.arafah-fade-in.delay-1 { animation-delay: .12s; }
.arafah-fade-in.delay-2 { animation-delay: .24s; }
.arafah-fade-in.delay-3 { animation-delay: .36s; }

@keyframes arafahFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Responsive ---- */
@media (max-width: 540px) {
    .arafah-chart-area { max-width: 320px; }
    .arafah-donate-btn { padding: 12px 24px; font-size: .95rem; }
}
