:root {
  --blue: #188aec;
  --blue-dark: #0f6fd1;
  --blue-bg: #eaf4ff;
  --text-dark: #16181c;
  --text-gray: #65676b;
  --text-gray-light: #8a8d91;
  --border: #e9e9eb;
  --avatar-bg: #e4e6ea;
  --avatar-text: #6b6f76;
  --page-bg: #f2f3f5;
  --max-width: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 6px;
}
.site-header img { height: 54px; }

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000;
}
.carousel .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 0;
}
.carousel .slide.active {
  opacity: 1;
  z-index: 1;
}
.carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 32%, rgba(0,0,0,0) 62%);
  pointer-events: none;
  z-index: 2;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  padding: 0;
}
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }
.carousel-arrow svg { width: 16px; height: 16px; }

.carousel-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 26px;
  z-index: 2;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.28;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.55);
  transition: width .2s;
  cursor: pointer;
}
.carousel-dots .dot.active {
  width: 18px;
  background: #fff;
}

/* ---------- Sections / spacing ---------- */
.section {
  padding: 18px 16px;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------- Progress block ---------- */
.progress-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-ring {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-ring .ring-bg { fill: none; stroke: #e6e9ec; stroke-width: 3.5; }
.progress-ring .ring-fg {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3.5;
  stroke-linecap: round;
}
.progress-ring .ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
}
.progress-text .amount {
  font-size: 16px;
}
.progress-text .amount strong { font-weight: 700; color: var(--text-dark); }
.progress-text .amount span { color: var(--text-gray); font-weight: 400; }
.progress-text .meta {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-gray-light);
}

/* ---------- Buttons ---------- */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.btn {
  flex: 1;
  height: 46px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline {
  background: #fff;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover { background: var(--blue-bg); }
.btn-full {
  width: 100%;
  background: #fff;
  color: var(--text-dark);
  border-color: var(--border);
  font-weight: 600;
}
.btn-full:hover { background: #f7f7f8; }
.btn-small {
  height: 40px;
  padding: 0 18px;
  flex: none;
  background: #fff;
  color: var(--text-dark);
  border-color: #d7d9dc;
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Body copy ---------- */
.body-copy p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dark);
  margin: 0 0 12px;
}
.body-copy p:last-of-type { margin-bottom: 6px; }
.read-more {
  font-size: 14.5px;
  font-weight: 600;
}
.body-copy .extra { display: none; }
.body-copy .extra.show { display: block; }

/* ---------- Donations heading ---------- */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading h2 {
  font-size: 19px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.count-badge {
  background: #f0f1f3;
  color: var(--text-gray);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 10px;
  padding: 2px 8px;
}
.see-highlights {
  font-size: 13px;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 4px;
}
.see-highlights:hover { text-decoration: none; color: var(--text-dark); }

/* ---------- Donation list ---------- */
.donation-list { margin-top: 4px; }
.donation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.donation-item:last-child { border-bottom: none; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--avatar-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.avatar svg { width: 18px; height: 18px; }
.donation-info .name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dark);
}
.donation-info .meta {
  font-size: 13px;
  color: var(--text-gray-light);
  margin-top: 1px;
}
.donation-info .meta .star {
  color: #f5a623;
  margin-left: 4px;
}

.donation-item.featured {
  background: #fffaf0;
  margin: 0 -16px;
  padding: 12px 16px;
  border-bottom-color: #f3e6c8;
}
.donation-item.featured .avatar {
  background: #fdeecb;
  color: #b6790a;
}

.see-highlights.active {
  color: var(--blue);
  font-weight: 600;
}

.donation-empty {
  padding: 18px 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-gray-light);
}

/* ---------- Organizer ---------- */
h3.block-title {
  font-size: 19px;
  margin: 0 0 14px;
}
.organizer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.organizer-row img.org-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.organizer-name { font-size: 15px; font-weight: 700; }
.organizer-role, .organizer-country { font-size: 13px; color: var(--text-gray-light); }

.contactar-btn { margin-top: 14px; }

.meta-line {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-gray-light);
}
.meta-line a { font-weight: 500; }

.protected-badge {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-bg);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
}
.protected-badge svg { width: 14px; height: 14px; }

/* ---------- Social icons ---------- */
.social-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 22px 16px;
}
.social-row a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #cfd2d6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3d42;
}
.social-row a:hover { border-color: var(--text-dark); text-decoration: none; }
.social-row svg { width: 16px; height: 16px; }

/* ---------- App badges ---------- */
.app-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 16px 20px;
  flex-wrap: wrap;
}
.app-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0a0a0a;
  color: #fff;
  border-radius: 8px;
  padding: 7px 12px;
}
.app-badge svg { width: 20px; height: 20px; flex-shrink: 0; }
.app-badge .lines { line-height: 1.15; }
.app-badge .small { font-size: 9px; opacity: 0.85; display: block; }
.app-badge .big { font-size: 13px; font-weight: 700; display: block; }

.copyright {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-gray-light);
  padding: 0 16px 18px;
}

/* ---------- Footer links ---------- */
.footer-links {
  padding: 4px 16px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-links a {
  color: var(--text-dark);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a:hover { text-decoration: underline; }
.consent-icon {
  background: var(--blue);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 4px;
  letter-spacing: 0.5px;
}

/* =====================================================
   Tela 2 — Elige el importe de tu donación
   ===================================================== */
.page-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 16px 44px;
  border-bottom: 1px solid var(--border);
}
.page-header-nav .back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}
.page-header-nav h1 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.heart-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 16px 10px;
}
.heart-badge svg { width: 20px; height: 20px; color: var(--blue); }

.page-title {
  font-size: 23px;
  font-weight: 800;
  margin: 0 16px 18px;
  line-height: 1.25;
  color: var(--text-dark);
}

.progress-card {
  margin: 0 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.progress-card .progress-ring { width: 54px; height: 54px; flex-shrink: 0; }
.progress-card .info .line1 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
}
.progress-card .info .line1 strong { color: var(--blue); }
.progress-card .info .line2 {
  font-size: 12.5px;
  color: var(--text-gray-light);
  margin-top: 3px;
}

.amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 18px;
}
.amount-option {
  position: relative;
  border: 1.5px solid #dfe1e4;
  border-radius: 10px;
  background: #fff;
  padding: 15px 8px 12px;
  min-height: 73px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  box-sizing: border-box;
}
.amount-option:hover { border-color: #b9bdc2; }
.amount-option.selected {
  border-color: var(--blue);
  background: var(--blue-bg);
  color: var(--blue);
}
.suggested-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #22c55e;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 10px;
  padding: 3px 9px;
}
.suggested-tag svg { width: 9px; height: 9px; }

.btn-continue {
  display: block;
  margin: 4px 16px 22px;
  height: 54px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 700;
  width: calc(100% - 32px);
  cursor: pointer;
  font-family: inherit;
}
.btn-continue:hover { background: var(--blue-dark); }

/* =====================================================
   Tela 3 — Confirmar donación (checkout)
   ===================================================== */
.checkout-page { background: var(--page-bg); }

.checkout-logo {
  display: flex;
  justify-content: center;
  padding: 22px 16px 4px;
}
.checkout-logo img { height: 46px; }

.donation-amount-line {
  text-align: center;
  font-size: 14px;
  color: var(--text-dark);
  margin: 4px 16px 6px;
}
.donation-amount-line strong { color: var(--blue); font-weight: 700; }

.continue-question {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 16px 18px;
}

.donor-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 16px 4px;
}
.donor-option {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1.5px solid #dfe1e4;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
}
.donor-option:hover { border-color: #b9bdc2; }
.donor-option.selected {
  border-color: var(--blue);
  background: var(--blue-bg);
}
.donor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.donor-avatar.anon { background: var(--blue-bg); color: var(--blue); }
.donor-avatar.updates { background: var(--blue); color: #fff; }
.donor-title { font-size: 14.5px; font-weight: 700; color: var(--text-dark); }
.donor-sub { font-size: 12.5px; color: var(--text-gray-light); margin-top: 2px; line-height: 1.35; }

.checkout-extra { margin-top: 20px; }

.field-group { margin: 0 16px 16px; }
.field-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-gray);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.field-group input {
  width: 100%;
  border: 1.5px solid #dfe1e4;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
  background: #fff;
}
.field-group input:focus { border-color: var(--blue); }
.field-group input::placeholder { color: #a9acb1; }

.payment-method-placeholder {
  height: 46px;
  border: 1.5px solid #dfe1e4;
  border-radius: 999px;
  background: #fff;
}

/* Stripe Payment Element / Express Checkout Element mounts */
#express-checkout-element:empty,
#payment-element:empty {
  height: 46px;
  border: 1.5px solid #dfe1e4;
  border-radius: 10px;
  background: #fff repeating-linear-gradient(90deg, #f4f5f6 0 20px, #eceeef 20px 40px);
  background-size: 200% 100%;
  animation: paySkeleton 1.1s linear infinite;
}
@keyframes paySkeleton { from { background-position: 0 0; } to { background-position: -40px 0; } }
#express-checkout-element { margin-bottom: 10px; min-height: 44px; }
#payment-element { margin-bottom: 4px; }

.payment-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-gray-light);
  font-size: 12px;
  margin: 12px 0;
}
.payment-divider::before,
.payment-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.payment-divider span { padding: 0 10px; }

.payment-message {
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  background: var(--blue-bg);
  color: var(--blue-dark);
}
.payment-message.error {
  background: #fdecec;
  color: #c0362c;
}

.summary-card {
  margin: 4px 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-gray);
  padding: 4px 0;
}
.summary-row.total {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 15px;
  margin-bottom: 14px;
}
.summary-row.total span:last-child { color: var(--blue); }
.summary-row:not(.total) span:last-child { font-weight: 600; color: var(--text-dark); }

.summary-card .btn-continue { margin: 0 0 10px; width: 100%; }

.secure-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-gray-light);
  margin-bottom: 14px;
}
.secure-line svg { width: 12px; height: 12px; }

.summary-card hr.divider { margin: 0 -16px 12px; width: calc(100% + 32px); }

.powered-by {
  text-align: center;
  font-size: 12.5px;
  color: #b3b6ba;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.powered-by .stripe-word {
  font-weight: 800;
  font-style: italic;
  color: #8892a0;
  font-size: 15px;
  letter-spacing: -0.3px;
}

/* =====================================================
   Responsive — small phones, tablets and desktop
   ===================================================== */

/* Belt-and-suspenders: never let an amount + currency break mid-number,
   even on very narrow phones (the HTML also uses non-breaking spaces
   inside the numbers themselves). */
.amount strong,
.amount span,
.progress-card .info .line1 strong,
.donation-amount-line strong,
.summary-row span:last-child {
  white-space: nowrap;
}

/* ---- Small phones (very narrow, e.g. 320px) — slightly tighter spacing ---- */
@media (max-width: 359px) {
  .section { padding: 16px 14px; }
  .amount-grid { gap: 8px; margin-left: 14px; margin-right: 14px; }
  .amount-option { font-size: 15.5px; padding: 13px 6px 11px; min-height: 68px; }
  .btn-row { gap: 8px; }
}

/* ---- Tablets and up — the card gets more room to breathe and slightly
        larger type, instead of just floating at phone width ---- */
@media (min-width: 640px) {
  body { padding: 32px 16px; }
  .page {
    max-width: 560px;
    min-height: auto;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  }

  .section { padding: 22px 24px; }
  .site-header { padding: 16px 0 8px; }
  .site-header img { height: 58px; }

  .body-copy p { font-size: 15.5px; }
  .section-heading h2,
  h3.block-title { font-size: 20px; }
  .donation-info .name { font-size: 15px; }
  .organizer-name { font-size: 16px; }

  .carousel-caption { font-size: 21px; left: 24px; right: 24px; bottom: 30px; }
  .btn { font-size: 15.5px; }

  .page-header-nav { padding: 18px 48px; }
  .page-header-nav h1 { font-size: 16px; }
  .page-title { font-size: 26px; margin: 0 24px 20px; }
  .heart-badge { margin: 22px 24px 12px; }
  .progress-card,
  .amount-grid,
  .field-group,
  .summary-card,
  .donor-options { margin-left: 24px; margin-right: 24px; }
  .btn-continue { margin-left: 24px; margin-right: 24px; width: calc(100% - 48px); }
  .amount-option { font-size: 18px; padding: 18px 8px 15px; min-height: 80px; }
  .continue-question { font-size: 18px; }
  .checkout-logo img { height: 52px; }
}

/* ---- Desktop — a bit more presence again; still a centered card,
        which is the right pattern for a focused donation flow rather
        than stretching content across a wide monitor ---- */
@media (min-width: 1024px) {
  .page { max-width: 620px; }
  .section { padding: 26px 32px; }
  .progress-card,
  .amount-grid,
  .field-group,
  .summary-card,
  .donor-options { margin-left: 32px; margin-right: 32px; }
  .btn-continue { margin-left: 32px; margin-right: 32px; width: calc(100% - 64px); }
  .page-title { font-size: 28px; margin: 0 32px 22px; }
  .heart-badge { margin: 26px 32px 14px; }
}

/* =====================================================
   Tela "obrigado" — resultado del pago (get-order-status)
   ===================================================== */
.order-status-area { text-align: center; padding: 12px 24px 4px; }

.order-status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 8px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-status-icon svg { width: 30px; height: 30px; }
.order-status-icon.loading { background: var(--blue-bg); }
.order-status-icon.loading::after {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--blue);
  border-top-color: transparent;
  animation: paySpin 0.8s linear infinite;
}
@keyframes paySpin { to { transform: rotate(360deg); } }
.order-status-icon.success { background: #e8f8ee; color: #1fae5c; }
.order-status-icon.pending { background: var(--blue-bg); color: var(--blue); }
.order-status-icon.error { background: #fdecec; color: #c0362c; }

.order-status-title { font-size: 21px; font-weight: 800; margin: 0 0 8px; color: var(--text-dark); }
.order-status-text { font-size: 14.5px; color: var(--text-gray); margin: 0 0 4px; line-height: 1.5; }
.order-status-meta { font-size: 13px; color: var(--text-gray-light); margin-top: 14px; }
.order-status-meta a { font-weight: 600; }

.upsell-card {
  margin: 22px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.upsell-card h3 { font-size: 16px; margin: 0 0 6px; color: var(--text-dark); }
.upsell-card p { font-size: 13.5px; color: var(--text-gray); margin: 0 0 14px; line-height: 1.45; }
.upsell-card .btn-continue { margin: 0; width: 100%; }
.upsell-card .btn-continue.secondary {
  background: #fff;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

@media (min-width: 640px) {
  .order-status-title { font-size: 24px; }
  .upsell-card { margin-left: 24px; margin-right: 24px; }
}
@media (min-width: 1024px) {
  .upsell-card { margin-left: 32px; margin-right: 32px; }
}
