/* ==============================================================
   Halal Village campaign page
   ============================================================== */

.hv-wrap {
    padding: 32px 0 60px;
}

/* Hero ---------------------------------------------------------- */
.hv-hero {
    text-align: center;
    padding: 28px 22px 26px;
    margin-bottom: 22px;
    background:
        linear-gradient(
            180deg,
            rgba(180, 140, 100, .10),
            rgba(180, 140, 100, .02) 60%,
            var(--card)
        ) padding-box,
        linear-gradient(
            135deg,
            var(--card-grad-from) 0%,
            var(--card-grad-mid) 55%,
            var(--card-grad-to) 100%
        ) border-box;
    border: var(--card-border);
    box-shadow: var(--shadow-sm);
}

.hv-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(180, 140, 100, .14);
    color: var(--brand-gold, #b48c64);
    border: 1px solid rgba(180, 140, 100, .35);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hv-hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-gold, #b48c64);
    animation: hv-pulse 1.6s infinite;
}

@keyframes hv-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: .55; }
}

.hv-hero-title {
    font-weight: 1000;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    color: var(--brand-green, #277245);
    margin: 14px 0 6px;
    letter-spacing: .5px;
}

.hv-hero-sub {
    color: var(--muted, #6b7280);
    font-weight: 700;
    margin: 0 auto;
    max-width: 720px;
    font-size: 1.02rem;
    line-height: 1.6;
}

/* Steps --------------------------------------------------------- */
.hv-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto 26px;
    flex-wrap: wrap;
    max-width: 720px;
}

.hv-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .04);
    color: var(--muted, #6b7280);
    font-weight: 900;
    font-size: 13px;
    transition: all .25s ease;
}

.hv-step.is-active {
    background: rgba(39, 114, 69, .12);
    color: var(--brand-green, #277245);
    box-shadow: 0 0 0 2px rgba(39, 114, 69, .18);
}

.hv-step.is-done {
    background: rgba(39, 114, 69, .18);
    color: var(--brand-green, #277245);
}

.hv-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    font-size: 12px;
    border: 2px solid currentColor;
}

.hv-step-line {
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: rgba(0, 0, 0, .08);
}

.hv-step-line.is-done {
    background: var(--brand-green, #277245);
}

/* Grid layout --------------------------------------------------- */
.hv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

/* min-width: 0 lets grid items shrink properly when their content is long.
   Without this, long unbreakable strings push the column past 1fr and
   spill into the neighbour. */
.hv-grid > * {
    min-width: 0;
}

@media (max-width: 900px) {
    .hv-grid {
        grid-template-columns: 1fr;
    }
}

.hv-card {
    padding: 22px;
    /* prevent any inner content from forcing the card wider than its column */
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hv-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hv-card-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.hv-card-title {
    font-weight: 1000;
    font-size: 1.15rem;
    color: var(--ink, #0f172a);
    line-height: 1.2;
}

.hv-card-sub {
    color: var(--muted, #6b7280);
    font-weight: 700;
    font-size: 13px;
    margin-top: 2px;
}

/* Terms --------------------------------------------------------- */
.hv-terms {
    background: rgba(180, 140, 100, .07);
    border: 1px solid rgba(180, 140, 100, .25);
    border-radius: 14px;
    padding: 18px 22px;
    color: var(--ink, #0f172a);
    font-weight: 600;
    line-height: 1.65;
    font-size: 15px;
}

.hv-terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hv-terms-list li {
    position: relative;
    padding-inline-start: 28px;
    line-height: 1.65;
    /* allow long words / URLs to wrap inside the card */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hv-terms-list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 4px;
    top: 0.55em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-gold, #b48c64);
    box-shadow: 0 0 0 3px rgba(180, 140, 100, .18);
}

/* Form ---------------------------------------------------------- */
.hv-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hv-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hv-label {
    font-weight: 900;
    font-size: 13px;
    color: var(--ink, #0f172a);
}

.hv-input {
    border: 1.5px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    background: var(--card, #fff);
    color: var(--ink, #0f172a);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.hv-input:focus {
    outline: none;
    border-color: var(--brand-green, #277245);
    box-shadow: 0 0 0 3px rgba(39, 114, 69, .15);
}

.hv-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    cursor: pointer;
    line-height: 1.45;
}

.hv-checkbox input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--brand-green, #277245);
    cursor: pointer;
}

.hv-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 1000;
}

.hv-submit:hover .hv-arrow {
    transform: translateX(3px);
}

[dir="rtl"] .hv-submit:hover .hv-arrow {
    transform: translateX(-3px);
}

.hv-arrow {
    display: inline-block;
    transition: transform .2s ease;
}

.hv-note {
    margin: 6px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted, #6b7280);
    line-height: 1.5;
}

/* Alerts -------------------------------------------------------- */
.hv-alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 800;
    font-size: 14px;
}

.hv-alert-error {
    background: rgba(220, 53, 69, .10);
    border: 1px solid rgba(220, 53, 69, .35);
    color: #b91c1c;
}

.hv-alert ul { padding-inline-start: 18px; margin: 0; }

/* Donate panel -------------------------------------------------- */
.hv-donate-panel {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.hv-donate-panel .hv-card-head {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

/* Hadith block — replaces the old donate_text + summary */
.hv-hadith {
    position: relative;
    background:
        linear-gradient(135deg,
            rgba(180, 140, 100, .10),
            rgba(180, 140, 100, .03)) padding-box,
        linear-gradient(
            135deg,
            var(--card-grad-from) 0%,
            var(--card-grad-mid) 55%,
            var(--card-grad-to) 100%
        ) border-box;
    border: var(--card-border);
    border-radius: 16px;
    padding: 26px 22px 18px;
    margin: 0 0 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.hv-hadith-mark {
    position: absolute;
    top: -16px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #b48c64);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 1000;
    box-shadow: 0 6px 18px rgba(180, 140, 100, .35);
}

.hv-hadith-text {
    color: var(--ink, #0f172a);
    font-weight: 700;
    font-size: clamp(15px, 2vw, 17px);
    line-height: 1.85;
    margin: 4px 0 14px;
    /* keep long Arabic text from breaking the card */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hv-hadith-source {
    display: inline-block;
    color: var(--brand-gold, #b48c64);
    font-weight: 1000;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 4px 14px;
    background: rgba(180, 140, 100, .12);
    border-radius: 999px;
}

.hv-donate-actions {
    display: flex;
    justify-content: center;
    margin: 4px 0 4px;
}

.hv-donate-btn {
    font-size: 1.05rem;
    padding: 14px 36px;
    font-weight: 1000;
    box-shadow: 0 8px 24px rgba(180, 140, 100, .35);
}

.hv-donate-btn:hover .hv-arrow {
    transform: translateX(4px);
}

[dir="rtl"] .hv-donate-btn:hover .hv-arrow {
    transform: translateX(-4px);
}

/* Dark mode ----------------------------------------------------- */
[data-theme="dark"] .hv-hero {
    background:
        linear-gradient(
            180deg,
            rgba(180, 140, 100, .12),
            rgba(180, 140, 100, .03) 60%,
            var(--card)
        ) padding-box,
        linear-gradient(
            135deg,
            var(--card-grad-from) 0%,
            var(--card-grad-mid) 55%,
            var(--card-grad-to) 100%
        ) border-box;
}

[data-theme="dark"] .hv-input {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .14);
    color: #fff;
}

[data-theme="dark"] .hv-step {
    background: rgba(255, 255, 255, .06);
}

[data-theme="dark"] .hv-summary {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .08);
}

[data-theme="dark"] .hv-step-line {
    background: rgba(255, 255, 255, .12);
}

[data-theme="dark"] .hv-terms {
    background: rgba(180, 140, 100, .10);
}

/* =================================================================
   Mobile — most users will browse on phones
   ================================================================= */
@media (max-width: 600px) {
    .hv-wrap { padding: 22px 0 50px; }

    .hv-hero { padding: 22px 16px 20px; margin-bottom: 16px; }
    .hv-hero-badge { font-size: 11px; padding: 5px 11px; letter-spacing: .5px; }
    .hv-hero-title { font-size: clamp(1.6rem, 7vw, 2.1rem); margin: 12px 0 6px; }
    .hv-hero-sub { font-size: 14px; line-height: 1.55; }

    .hv-steps { gap: 4px; margin-bottom: 18px; }
    .hv-step { padding: 6px 10px; font-size: 11px; gap: 6px; }
    .hv-step-num { width: 20px; height: 20px; font-size: 11px; border-width: 1.5px; }
    .hv-step-line { width: 18px; height: 2px; }
    .hv-step-label { white-space: nowrap; }

    .hv-card { padding: 16px; }
    .hv-card-icon { font-size: 1.4rem; }
    .hv-card-title { font-size: 1rem; }
    .hv-card-sub { font-size: 12px; }

    .hv-terms { padding: 14px 16px; font-size: 14px; }
    .hv-terms-list { gap: 8px; }
    .hv-terms-list li { padding-inline-start: 22px; line-height: 1.55; }
    .hv-terms-list li::before { width: 8px; height: 8px; top: 0.5em; }

    .hv-input { padding: 11px 12px; font-size: 14px; }
    .hv-checkbox { font-size: 13px; }
    .hv-submit { padding: 12px 18px; font-size: 14px; }

    .hv-hadith { padding: 22px 16px 14px; margin-bottom: 18px; }
    .hv-hadith-mark { width: 34px; height: 34px; top: -14px; font-size: 1.1rem; }
    .hv-hadith-text { font-size: 14px; line-height: 1.7; }
    .hv-hadith-source { font-size: 11px; padding: 3px 10px; letter-spacing: 1px; }

    .hv-donate-btn { padding: 12px 22px; font-size: 1rem; width: 100%; }
}
