:root {
    --bg: #f7fbff;
    --surface: #ffffff;
    --surface-2: #eef7ff;
    --text: #172033;
    --muted: #627089;
    --primary: #1677ff;
    --primary-dark: #0d55c6;
    --accent: #19b394;
    --danger: #e25b5b;
    --warning: #ffb020;
    --border: #dce7f3;
    --shadow: 0 24px 70px rgba(26, 54, 93, .14);
    --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #dff1ff 0, transparent 34%), var(--bg);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(220,231,243,.8);
}
.nav {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.logo-badge {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 12px 30px rgba(22,119,255,.25);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--muted);
}
.nav-links a:hover { color: var(--primary); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
    box-shadow: 0 12px 30px rgba(22,119,255,.18);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: white; }
.btn-light { background: white; color: var(--primary); border: 1px solid var(--border); box-shadow: none; }
.btn-danger { background: var(--danger); color: white; }

.hero {
    padding: 72px 0 48px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    align-items: center;
    gap: 42px;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #0b6d5c;
    background: #e7fff7;
    border: 1px solid #c6f4e7;
    font-weight: 800;
    font-size: 13px;
}
h1 {
    margin: 18px 0 18px;
    font-size: clamp(36px, 5vw, 68px);
    line-height: .98;
    letter-spacing: -.06em;
}
.lead {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--muted);
    max-width: 620px;
}
.hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.trust-row {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.trust-card {
    padding: 16px;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--border);
    border-radius: 18px;
}
.trust-card strong { display: block; font-size: 20px; }
.trust-card span { color: var(--muted); font-size: 13px; }

.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.hero-photo-wrap {
    position: relative;
    min-height: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-2);
}
.hero-photo {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}
.hero-photo-placeholder {
    min-height: 420px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    padding: 28px;
}
.urgent-chip {
    position: absolute;
    left: 18px;
    bottom: 18px;
    right: 18px;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(220,231,243,.9);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 35px rgba(0,0,0,.12);
}
.urgent-chip strong { display: block; }
.urgent-chip span { color: var(--muted); font-size: 14px; }

.section { padding: 58px 0; }
.section-title {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 32px;
}
.section-title h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.08;
    letter-spacing: -.04em;
}
.section-title p { color: var(--muted); margin: 0; }

.story-grid {
    display: grid;
    grid-template-columns: 1fr .82fr;
    gap: 28px;
    align-items: start;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(26,54,93,.08);
}
.story-card { padding: 34px; }
.story-card h3 { margin-top: 0; font-size: 28px; }
.story-text { color: #33415c; font-size: 17px; white-space: pre-wrap; }
.needs-list {
    display: grid;
    gap: 14px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.needs-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--surface-2);
    padding: 14px;
    border-radius: 16px;
    color: #33415c;
}
.check {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dffaf3;
    color: #0b846c;
    font-weight: 900;
}

.donation-card {
    padding: 28px;
    position: sticky;
    top: 96px;
}
.donation-card h3 { margin: 0 0 8px; font-size: 26px; }
.donation-card p { color: var(--muted); }
.progress-wrap { margin: 22px 0; }
.progress-label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}
.progress-bar {
    height: 14px;
    background: #e4edf8;
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: inherit;
}
.donation-methods { display: grid; gap: 14px; }
.method {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    background: #fbfdff;
}
.method strong { display: block; }
.method small { color: var(--muted); }
.bank-data {
    display: grid;
    gap: 8px;
    margin: 14px 0;
    font-size: 14px;
}
.bank-data div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
}
.bank-data span { color: var(--muted); }
.bank-data b { text-align: right; }
.safe-note {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #fff8e8;
    color: #70521b;
    font-size: 14px;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.update-card { overflow: hidden; }
.update-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: var(--surface-2);
}
.update-body { padding: 20px; }
.update-date { color: var(--primary); font-weight: 800; font-size: 13px; }
.update-body h3 { margin: 8px 0; }
.update-body p { color: var(--muted); margin-bottom: 0; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 14px 35px rgba(26,54,93,.08);
}
.gallery-item img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}
.gallery-caption { padding: 12px 14px; color: var(--muted); font-size: 14px; }

.final-cta {
    padding: 72px 0;
    background: linear-gradient(135deg, #0d55c6, #16a085);
    color: white;
    text-align: center;
}
.final-cta h2 {
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.06;
    letter-spacing: -.04em;
    margin: 0 0 14px;
}
.final-cta p {
    max-width: 760px;
    margin: 0 auto 24px;
    color: rgba(255,255,255,.88);
    font-size: 18px;
}
.final-cta .btn-light { color: #0d55c6; }

.footer {
    padding: 30px 0;
    color: var(--muted);
    font-size: 14px;
    background: white;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.float-donate {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 70;
}
.float-donate .btn { width: 100%; }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .hero { padding-top: 42px; }
    .hero-grid, .story-grid { grid-template-columns: 1fr; }
    .donation-card { position: static; }
    .trust-row { grid-template-columns: 1fr; }
    .updates-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .float-donate { display: block; }
    body { padding-bottom: 86px; }
}

@media (max-width: 520px) {
    .container { width: min(100% - 22px, 1120px); }
    .story-card, .donation-card { padding: 22px; }
    .hero-photo, .hero-photo-wrap, .hero-photo-placeholder { min-height: 320px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
}

.method-highlight {
    background: linear-gradient(135deg, #ecfff9, #eff6ff);
    border-color: #bfeee1;
}
.payment-page { padding-top: 86px; }
.payment-grid {
    display: grid;
    grid-template-columns: 1fr .82fr;
    gap: 28px;
    align-items: start;
}
.amount-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 18px 0;
}
.amount-option {
    display: block;
    margin: 0;
    cursor: pointer;
}
.amount-option input { display: none; }
.amount-option span {
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: #fbfdff;
    border-radius: 16px;
    padding: 16px 10px;
    font-weight: 900;
    color: var(--text);
}
.amount-option input:checked + span {
    border-color: var(--primary);
    background: #eef6ff;
    color: var(--primary-dark);
    box-shadow: 0 10px 25px rgba(22,119,255,.12);
}
button[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}
@media (max-width: 900px) {
    .payment-grid { grid-template-columns: 1fr; }
    .amount-grid { grid-template-columns: 1fr; }
}

/* Donar: selección clara del monto */
.donation-card .field-group {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}
.donation-card label,
.field-title {
    display: block;
    color: var(--text);
    font-weight: 800;
    line-height: 1.3;
}
.donation-card label span {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}
.donation-card input[type="text"],
.donation-card input[type="email"],
.donation-card input[type="number"],
.donation-card input:not([type]) {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 15px;
    background: #fbfdff;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: .18s ease;
}
.donation-card input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22,119,255,.10);
    background: #fff;
}
.donation-card input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
    opacity: .8;
}
.custom-amount-box {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fbfdff;
    transition: .18s ease;
}
.custom-amount-box.is-active {
    border-color: var(--primary);
    background: #eef6ff;
    box-shadow: 0 10px 25px rgba(22,119,255,.10);
}
.custom-amount-head {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0 0 12px;
}
.custom-amount-head input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}
.custom-amount-input-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}
.currency-prefix,
.currency-suffix {
    color: var(--muted);
    font-weight: 900;
}
.custom-amount-box small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}
.donation-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ecfff9, #eff6ff);
    border: 1px solid #bfeee1;
}
.donation-summary span {
    color: var(--muted);
    font-weight: 800;
}
.donation-summary strong {
    color: var(--primary-dark);
    font-size: 22px;
    line-height: 1;
}
.field-grid {
    display: grid;
    gap: 14px;
}
.payment-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.payment-actions .btn-accent {
    flex: 1 1 260px;
}
.payment-actions .btn-light {
    flex: 0 0 auto;
}
@media (max-width: 560px) {
    .payment-actions .btn,
    .payment-actions .btn-light,
    .payment-actions .btn-accent {
        width: 100%;
        flex: 1 1 100%;
    }
    .donation-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}
