/* =========================================================
   DONATE (Foundation) + SUPPORT A LEARNER (Academy) + RECEIPT
   Shared styles, prefix dn-*. Loaded only on these pages.
   ========================================================= */
:root {
    --dn-navy: #034861;
    --dn-teal: #016d77;
    --dn-gold: #deb65e;
    --dn-gold-deep: #b98d2f;
    --dn-ink: #16243a;
    --dn-muted: #5f6670;
    --dn-line: #e2e8ee;
    --dn-mist: #f4f8f9;
}

/* ---------- Hero ---------- */
.dn-hero {
    position: relative;
    isolation: isolate;
    padding: 80px 0 130px;
    background-size: cover;
    background-position: center 42%;
    color: #fff;
    overflow: hidden;
}
.dn-hero-foundation { background-image: url('../images/breadcrumb/donate.webp'); }
.dn-hero-academy    { background-image: url('../images/breadcrumb/stud.jpg'); }

.dn-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #2d2d2d94;
}


.dn-hero-inner { max-width: 720px; }
.dn-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 14px;
    font-weight: 600;
}
.dn-hero-badge i { color: var(--dn-gold); }

.dn-hero h1 {
    color: #fff;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}
.dn-hero p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 17.5px;
    line-height: 1.7;
    max-width: 620px;
    margin-bottom: 26px;
}

.dn-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.92);
}
.dn-trust i { color: var(--dn-gold); margin-right: 6px; }

/* Academy: how it works (a real sequence, so numbered) */
.dn-how {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.dn-how li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 8px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14.5px;
    font-weight: 600;
}
.dn-how li span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dn-gold);
    color: var(--dn-navy);
    font-size: 13px;
    font-weight: 800;
}

/* ---------- Main layout ---------- */
.dn-main {
    position: relative;
    z-index: 2;
    margin-top: -90px;
    padding-bottom: 90px;
    background: linear-gradient(to bottom, transparent 90px, #f6f8fc 90px);
}

.dn-card {
    background: #fff;
    border: 1px solid var(--dn-line);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(3, 72, 97, 0.12);
    overflow: hidden;
}
.dn-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 30px;
    border-bottom: 1px solid var(--dn-line);
}
.dn-card-head h2 { margin: 0; font-size: 23px; font-weight: 800; color: var(--dn-navy); }
.dn-card-tag {
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(1, 109, 119, 0.1);
    color: var(--dn-teal);
    font-size: 13px;
    font-weight: 700;
}
.dn-card-body { padding: 28px 30px 30px; }

/* Steps */
.dn-step { border: 0; margin: 0 0 30px; padding: 0; min-width: 0; }
.dn-step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    float: none;
    width: auto;
    margin-bottom: 14px;
    font-size: 17px;
    font-weight: 700;
    color: var(--dn-ink);
}
.dn-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dn-navy);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

/* ---------- Radio option tiles ---------- */
.dn-options { display: grid; gap: 10px; }
.dn-options-grid { grid-template-columns: repeat(2, 1fr); }
.dn-option-wide { grid-column: 1 / -1; }

.dn-option { position: relative; display: block; margin: 0; cursor: pointer; }
.dn-option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.dn-option-body {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 14px 16px;
    border: 2px solid var(--dn-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.dn-option:hover .dn-option-body { border-color: rgba(1, 109, 119, 0.45); }
.dn-option input:checked + .dn-option-body {
    border-color: var(--dn-teal);
    background: var(--dn-mist);
    box-shadow: 0 8px 20px rgba(1, 109, 119, 0.1);
}
.dn-option input:focus-visible + .dn-option-body { outline: 3px solid rgba(1, 109, 119, 0.35); outline-offset: 2px; }

.dn-option-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(1, 109, 119, 0.1);
    color: var(--dn-teal);
    font-size: 18px;
    transition: background .2s ease, color .2s ease;
}
.dn-option input:checked + .dn-option-body .dn-option-icon { background: var(--dn-teal); color: #fff; }

.dn-option-text { flex: 1; min-width: 0; }
.dn-option-text b { display: block; color: var(--dn-ink); font-size: 15.5px; line-height: 1.3; }
.dn-option-text small { display: block; margin-top: 3px; color: var(--dn-muted); font-size: 13px; line-height: 1.45; }

.dn-option-check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--dn-line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 11px;
    transition: all .2s ease;
}
.dn-option input:checked + .dn-option-body .dn-option-check { background: var(--dn-teal); border-color: var(--dn-teal); color: #fff; }

/* Plans (Academy) */
.dn-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dn-plan .dn-option-body { flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px; }
.dn-plan-custom { grid-column: 1 / -1; }
.dn-plan-name { color: var(--dn-ink); font-size: 15.5px; }
.dn-plan-price { color: var(--dn-navy); font-size: 22px; font-weight: 800; line-height: 1.2; }
.dn-plan-price small { color: var(--dn-muted); font-size: 12.5px; font-weight: 500; }
.dn-plan-text { color: var(--dn-muted); font-size: 13px; line-height: 1.45; }
.dn-plan-flag {
    position: absolute;
    top: -11px;
    right: 14px;
    padding: 3px 10px;
    border-radius: 50px;
    background: var(--dn-gold);
    color: var(--dn-navy);
    font-size: 11.5px;
    font-weight: 800;
}

.dn-plan-extra { margin-top: 14px; }
.dn-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dn-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--dn-line);
    border-radius: 12px;
    overflow: hidden;
}
.dn-stepper button {
    width: 42px;
    height: 42px;
    border: 0;
    background: var(--dn-mist);
    color: var(--dn-navy);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}
.dn-stepper button:hover { background: rgba(1, 109, 119, 0.12); }
.dn-stepper input {
    width: 56px;
    height: 42px;
    border: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--dn-ink);
    -moz-appearance: textfield;
}
.dn-stepper input::-webkit-outer-spin-button,
.dn-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.dn-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--dn-navy);
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
}
.dn-total b { color: #fff; font-size: 26px; font-weight: 800; }

/* ---------- Amount chips (Foundation) ---------- */
.dn-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dn-chip {
    padding: 13px 10px;
    border: 2px solid var(--dn-line);
    border-radius: 12px;
    background: #fff;
    color: var(--dn-navy);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.dn-chip:hover { border-color: rgba(1, 109, 119, 0.45); }
.dn-chip.is-active { border-color: var(--dn-teal); background: var(--dn-mist); color: var(--dn-teal); }
.dn-chip:focus-visible { outline: 3px solid rgba(1, 109, 119, 0.35); outline-offset: 2px; }

.dn-money { position: relative; display: flex; align-items: center; }
.dn-money span {
    position: absolute;
    left: 16px;
    color: var(--dn-navy);
    font-size: 18px;
    font-weight: 800;
}
.dn-money input {
    width: 100%;
    padding: 12px 16px 12px 36px;
    border: 2px solid var(--dn-line);
    border-radius: 12px;
    color: var(--dn-navy);
    font-size: 18px;
    font-weight: 700;
    outline: none;
    transition: border-color .2s ease;
}
.dn-money input:focus { border-color: var(--dn-teal); }

.dn-impact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fbf6ea;
    color: #6b5316;
    font-size: 14px;
    line-height: 1.5;
}
.dn-impact i { margin-top: 2px; color: var(--dn-gold-deep); font-size: 16px; }

/* ---------- Fields ---------- */
.dn-label { display: block; margin-bottom: 6px; color: #3c4756; font-size: 13.5px; font-weight: 700; }
.dn-req { color: #dc2626; }
.dn-hint { color: var(--dn-muted); font-weight: 500; }
.dn-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--dn-line);
    border-radius: 10px;
    background: #fff;
    color: var(--dn-ink);
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.dn-input:focus { outline: none; border-color: var(--dn-teal); box-shadow: 0 0 0 3px rgba(1, 109, 119, 0.12); }
.dn-upper { text-transform: uppercase; }
textarea.dn-input { resize: vertical; min-height: 84px; }

.dn-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    color: var(--dn-muted);
    font-size: 14px;
    cursor: pointer;
}
.dn-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--dn-teal); flex-shrink: 0; }

.dn-error {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
}

/* ---------- Pay button ---------- */
.dn-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border: 0;
    border-radius: 50px;
    background: var(--dn-gold);
    color: var(--dn-navy);
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(222, 182, 94, 0.4);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.dn-pay-btn:hover:not(:disabled) { background: #e7c472; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(222, 182, 94, 0.5); }
.dn-pay-btn:focus-visible { outline: 3px solid var(--dn-navy); outline-offset: 3px; }
.dn-pay-btn:disabled { opacity: .75; cursor: wait; }

.dn-methods { margin: 12px 0 0; color: var(--dn-muted); font-size: 13px; text-align: center; }

/* ---------- Sidebar ---------- */
.dn-side { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 992px) {
    .dn-side { position: sticky; top: 110px; }
}
.dn-side-card {
    padding: 22px 24px;
    border: 1px solid var(--dn-line);
    border-radius: 18px;
    background: #fff;
}
.dn-side-title { margin: 0 0 12px; color: var(--dn-navy); font-size: 18px; font-weight: 800; }
.dn-side-text, .dn-side-card p { color: var(--dn-muted); font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.dn-side-note { margin: 12px 0 0 !important; font-size: 13px !important; }
.dn-side-note a { color: var(--dn-teal); font-weight: 700; }

.dn-side-list { list-style: none; margin: 0; padding: 0; }
.dn-side-list li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px dashed var(--dn-line); }
.dn-side-list li:first-child { border-top: 0; padding-top: 0; }
.dn-side-list i {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(1, 109, 119, 0.1);
    color: var(--dn-teal);
    font-size: 16px;
}
.dn-side-list b { display: block; color: var(--dn-ink); font-size: 15px; }
.dn-side-list span { color: var(--dn-muted); font-size: 13.5px; line-height: 1.5; }

.dn-tax { display: flex; gap: 14px; background: #fbf6ea; border-color: #f0e2bd; }
.dn-tax-icon { color: var(--dn-gold-deep); font-size: 26px; margin-top: 2px; }
.dn-tax p { margin: 0; color: #6b5316; }

.dn-bank { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--dn-mist); }
.dn-bank div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--dn-line); font-size: 13.5px; }
.dn-bank div:last-child { border-bottom: 0; }
.dn-bank dt { color: var(--dn-muted); font-weight: 600; }
.dn-bank dd { margin: 0; color: var(--dn-ink); font-weight: 600; text-align: right; }
.dn-copy {
    margin-left: 6px;
    padding: 2px 8px;
    border: 0;
    border-radius: 6px;
    background: #dfe7ec;
    color: var(--dn-navy);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}
.dn-copy:hover { background: var(--dn-teal); color: #fff; }

.dn-cross {
    display: block;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--dn-navy);
    color: #fff !important;
    text-decoration: none;
    transition: background .2s ease;
}
.dn-cross:hover { background: #045a78; }
.dn-cross-kicker { display: block; color: var(--dn-gold); font-size: 13px; font-weight: 700; }
.dn-cross b { display: block; margin: 4px 0 10px; font-size: 17px; line-height: 1.35; }
.dn-cross-link { font-size: 14.5px; font-weight: 700; }
.dn-cross-link i { margin-left: 6px; transition: transform .2s ease; }
.dn-cross:hover .dn-cross-link i { transform: translateX(4px); }

/* ---------- FAQ ---------- */
.dn-faq { padding: 80px 0 90px; background: #fff; border-top: 1px solid var(--dn-line); }
.dn-faq .container { max-width: 860px; }
.dn-faq-title { margin-bottom: 30px; color: var(--dn-navy); font-size: 32px; font-weight: 800; text-align: center; }
.dn-faq .accordion-item { margin-bottom: 12px; border: 1px solid var(--dn-line); border-radius: 14px !important; overflow: hidden; }
.dn-faq .accordion-button { padding: 18px 22px; background: #fff; color: var(--dn-navy); font-size: 16px; font-weight: 700; box-shadow: none; }
.dn-faq .accordion-button:not(.collapsed) { background: var(--dn-mist); color: var(--dn-teal); }
.dn-faq .accordion-body { padding: 16px 22px 20px; color: #475569; font-size: 15px; line-height: 1.7; }

/* ---------- Success / receipt ---------- */
.dn-done { padding: 70px 0 100px; background: #f6f8fc; }
.dn-done .container { max-width: 760px; }
.dn-done-head { text-align: center; margin-bottom: 28px; }
.dn-done-head h1 { color: var(--dn-navy); font-size: 36px; font-weight: 800; margin: 14px 0 10px; }
.dn-done-head p { color: var(--dn-muted); font-size: 16.5px; line-height: 1.65; max-width: 580px; margin: 0 auto; }
.dn-done-head a { color: var(--dn-teal); font-weight: 700; }

.dn-done-mark { display: inline-block; width: 78px; height: 78px; }
.dn-done-mark svg { width: 100%; height: 100%; }
.dn-done-mark circle { fill: none; stroke: var(--dn-teal); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: dnDraw .6s ease forwards; }
.dn-done-mark path { fill: none; stroke: var(--dn-teal); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: dnDraw .4s ease .55s forwards; }
@keyframes dnDraw { to { stroke-dashoffset: 0; } }

.dn-receipt {
    background: #fff;
    border: 1px solid var(--dn-line);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(3, 72, 97, 0.08);
    overflow: hidden;
}
.dn-receipt-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; border-bottom: 1px solid var(--dn-line); }
.dn-receipt-top img { max-height: 48px; width: auto; }
.dn-receipt-top div { text-align: right; }
.dn-receipt-top h2 { margin: 0; color: var(--dn-navy); font-size: 20px; font-weight: 800; }
.dn-receipt-top span { color: var(--dn-muted); font-size: 14px; }

.dn-receipt-amount { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 28px; background: var(--dn-mist); }
.dn-receipt-amount span { color: var(--dn-muted); font-size: 14.5px; }
.dn-receipt-amount b { color: var(--dn-navy); font-size: 28px; font-weight: 800; }

.dn-receipt-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.dn-receipt-table th, .dn-receipt-table td { padding: 12px 28px; border-bottom: 1px solid #eef2f5; vertical-align: top; }
.dn-receipt-table th { width: 210px; color: var(--dn-muted); font-weight: 600; }
.dn-receipt-table td { color: var(--dn-ink); font-weight: 600; word-break: break-word; }

.dn-status { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 12.5px; font-weight: 700; }
.dn-status-paid { background: #dcfce7; color: #166534; }
.dn-status-pending { background: #fef3c7; color: #92400e; }
.dn-status-failed { background: #fee2e2; color: #991b1b; }

.dn-receipt-foot { padding: 18px 28px 22px; }
.dn-receipt-foot p { margin: 0 0 6px; color: var(--dn-muted); font-size: 12.5px; line-height: 1.6; }

.dn-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.dn-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1.5px solid var(--dn-line);
    border-radius: 50px;
    background: #fff;
    color: var(--dn-navy) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.dn-btn:hover { border-color: var(--dn-teal); color: var(--dn-teal) !important; }
.dn-btn-primary { background: var(--dn-teal); border-color: var(--dn-teal); color: #fff !important; }
.dn-btn-primary:hover { background: var(--dn-navy); border-color: var(--dn-navy); color: #fff !important; }
.dn-btn-quiet { border-color: transparent; background: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .dn-hero { padding: 80px 0 130px; }
    .dn-hero h1 { font-size: 36px; }
}
@media (max-width: 575px) {
    .dn-hero { padding: 60px 0 120px; }
    .dn-hero h1 { font-size: 29px; }
    .dn-hero p { font-size: 16px; }
    .dn-card-head, .dn-card-body { padding-left: 18px; padding-right: 18px; }
    .dn-card-head h2 { font-size: 20px; }
    .dn-options-grid, .dn-plans { grid-template-columns: 1fr; }
    .dn-chips { grid-template-columns: repeat(2, 1fr); }
    .dn-total b { font-size: 22px; }
    .dn-faq-title { font-size: 26px; }
    .dn-done-head h1 { font-size: 28px; }
    .dn-receipt-top { flex-direction: column; align-items: flex-start; }
    .dn-receipt-top div { text-align: left; }
    .dn-receipt-table th, .dn-receipt-table td { display: block; width: auto; padding: 4px 20px; border: 0; }
    .dn-receipt-table tr { display: block; padding: 8px 0; border-bottom: 1px solid #eef2f5; }
    .dn-receipt-amount, .dn-receipt-foot { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .dn-done-mark circle, .dn-done-mark path { animation: none; stroke-dashoffset: 0; }
    .dn-pay-btn, .dn-cross-link i { transition: none; }
}

/* ---------- Print: only the receipt ---------- */
@media print {
    body * { visibility: hidden !important; }
    #dnReceipt, #dnReceipt * { visibility: visible !important; }
    #dnReceipt { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; }
    .wa-widget { display: none !important; }
}
