/* =====================================================
   SuaPlataforma — landing page de campanha (referência de
   estrutura inspirada em páginas de doação estilo GoFundMe)
   ===================================================== */

:root{
  /* values below were read from computed styles on the live reference page,
     not eyeballed — exact brand tokens, ready to swap for your own */
  --accent: #4a9d44;       /* ring / progress fill — grass green */
  --accent-dark: #0b6b4c;
  --accent-soft: #d9f5e8;
  --accent-lime: #ccf88e;  /* Donate button bg / Share button text */
  --accent-deep: #274a34;  /* Donate button text / Share button bg */
  --ink: #232323;
  --ink-soft: #5b6b63;
  --border: #e3e8e5;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --danger: #d64545;
  --radius: 14px;
  --max-width: 560px; /* largura tipo "mobile card" centralizada no desktop */
}

*{ box-sizing: border-box; }

html,body{
  margin:0;
  padding:0;
  background: var(--bg-alt);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  /* Alguns elementos decorativos (ex: a curva atrás do círculo de progresso)
     sangram de propósito um pouco pra fora do próprio container pra criar o
     efeito visual — isso é esperado. O que não é esperado é isso criar
     scroll horizontal na página inteira, então cortamos aqui, na raiz. */
  overflow-x: hidden;
}

img{ max-width:100%; display:block; }

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

button{ font-family: inherit; cursor: pointer; }

/* ---------- layout shell ---------- */
main, .site-header, .site-footer{
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header{
  background: var(--bg);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 18px;
  min-height: 56px; /* matches the real reference header exactly */
  border-bottom: 1px solid var(--border);
  position: sticky;
  top:0;
  z-index: 20;
}

.logo{
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo span{ color: var(--accent); }

.icon-btn{
  background:none;
  border:none;
  color: var(--ink);
  padding: 6px;
  border-radius: 50%;
  display:flex;
}
.icon-btn:hover{ background: var(--bg-alt); }

/* ---------- hero ---------- */
.hero{ background: var(--bg); }

.avatar{
  position:relative;
  width: 32px; height:32px;
  border-radius:50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  font-weight:700;
  color: var(--ink-soft);
  flex-shrink:0;
}
/* real photo (if present) covers the fallback letter completely */
.avatar img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
}
.avatar-sm{ width:28px; height:28px; font-size:.85rem; }
.avatar-lg{ width:56px; height:56px; font-size:1.3rem; }
.avatar-anon svg{ width:17px; height:17px; }

.organizer-name{ font-weight:600; }

/* image fills edge-to-edge; avatar/name and title sit ON TOP of it.
   390/478 is the exact ratio measured on the live reference page at
   mobile width — not a guess. */
.hero-media{
  position:relative;
  aspect-ratio: 390 / 478;
  overflow:hidden;
}
.hero-slide{
  position:absolute; inset:0;
  opacity:0;
  background-size: cover;
  background-position: center;
  transition: opacity .4s ease;
}
.hero-slide.active{ opacity:1; }

/* dark gradient so white text/avatar stay legible over any photo */
.hero-scrim{
  position:absolute; inset:0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.45) 0%,
    rgba(0,0,0,0) 24%,
    rgba(0,0,0,0) 52%,
    rgba(0,0,0,.6) 100%
  );
  pointer-events:none;
  z-index:1;
}

.hero-overlay-top{
  position:absolute;
  top:16px; left:16px; right:16px;
  display:flex; align-items:center; gap:10px;
  z-index:2;
}
.avatar-onphoto{
  background:#fff;
  border:none;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0,0,0,.3);
}
.organizer-name-onphoto{
  color:#fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
}

.hero-overlay-bottom{
  position:absolute;
  left:0; right:0; bottom:40px;
  padding: 0 18px;
  z-index:2;
  text-align:center;
}

.hero-dots{
  position:absolute;
  bottom:14px; left:0; right:0;
  display:flex; justify-content:center; gap:6px;
  z-index:2;
}
.dot{
  width:6px; height:6px; border-radius:50%;
  background: rgba(255,255,255,.5);
}
.dot.active{ background:#fff; width:8px; height:8px; }

.hero-title{
  font-size: clamp(1.7rem, 7vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height:1.2;
  color:#fff;
  text-align:center;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  margin:0 auto;
  max-width: 22ch;
}

/* ---------- progress / CTA ---------- */
.progress-block{
  background: var(--bg);
  padding: 8px 18px 24px;
  display:grid;
  grid-template-columns: 84px 1fr;
  align-items:center;
  gap: 4px 16px;
}

/* white panel curves up into the bottom of the hero photo, no hard edge.
   Implemented as a decorative ellipse behind the real (rectangular) content
   box, so it never clips the progress circle / text that flows normally. */
.hero-curve{
  position:relative;
  z-index:1; /* creates a local stacking context so ::before (z-index:-1)
                only drops behind THIS block's own content, not the whole page */
  padding-top: 18px;
}
.hero-curve::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:-30px;
  left:-20%;
  right:-20%;
  height:60px;
  background: var(--bg);
  border-radius: 50%;
  box-shadow: 0 -6px 14px rgba(0,0,0,.08);
}

.progress-circle{ position:relative; width:84px; height:84px; grid-row: span 2; }
.progress-circle-sm{ width:52px; height:52px; }
.progress-circle-sm .progress-pct{ font-size:.72rem; }
.progress-circle svg{ width:100%; height:100%; transform: rotate(-90deg); }
.progress-circle .track{
  fill:none; stroke: rgba(0,0,0,.06); stroke-width:9.6;
}
.progress-circle .fill{
  fill:none; stroke: url(#progressGradient); stroke-width:9.6; stroke-linecap:round;
  stroke-dasharray: 213.6; /* 2*pi*34 */
  stroke-dashoffset: calc(213.6 - (213.6 * var(--pct)) / 100);
  transition: stroke-dashoffset .6s ease;
}
.progress-pct{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:1.05rem; font-weight:800; color: var(--ink);
}

.progress-info .raised{ margin:0; font-size:1.4rem; font-weight:800; line-height:1.2; }
.progress-info .raised span{ color: var(--ink-soft); font-weight:400; font-size:1rem; }
.goal-amount{ text-decoration: underline; }
.progress-info .last-donation{
  margin: 4px 0 0; color: var(--ink-soft); font-size:.95rem;
}
.chev{ color: var(--border); }

.cta-row{
  grid-column: 1 / -1;
  display:flex; gap:10px; margin-top:14px;
}
.cta-row-secondary{ margin-top:20px; }

.btn{
  border-radius: 999px;
  border: none;
  min-height: 48px;
  padding: 0 24px;
  display:flex; align-items:center; justify-content:center; gap:7px;
  font-weight: 800;
  font-size: 1rem;
  flex:1;
  text-align:center;
}
.btn-icon{ width:16px; height:16px; flex-shrink:0; }
.btn-primary{ background: var(--accent-lime); color: var(--accent-deep); }
.btn-primary:hover{ background:#bdec6e; }
.btn-secondary{ background: var(--accent-deep); color: var(--accent-lime); }
.btn-secondary:hover{ background:#1c3a28; }
.btn-outline{ background:#fff; color: var(--ink); border:1px solid var(--border); min-height:44px; }
.btn-outline:hover{ background: var(--bg-alt); }
.btn-block{ width:100%; }
.btn-sm{ min-height:40px; padding:0 16px; font-size:.85rem; }

/* ---------- description ---------- */
.description{
  background: var(--bg);
  padding: 4px 18px 20px;
}
.clamp{
  display:-webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.clamp.expanded{
  -webkit-line-clamp: unset;
  overflow: visible;
}
.link-btn{
  background:none; border:none; color: var(--accent-dark);
  font-weight:700; padding: 8px 0; text-decoration: underline;
}

/* ---------- donations ---------- */
.donations{
  background: var(--bg);
  padding: 20px 18px;
  border-top: 8px solid var(--bg-alt);
}
.donations-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 14px;
}
.donations-head .btn{ flex:none; }
.donations-head h2{ margin:0; font-size:1.2rem; }
.badge{
  background: var(--bg-alt); border:1px solid var(--border);
  border-radius:999px; padding:2px 9px; font-size:.8rem; font-weight:700;
  margin-left:6px;
}
.donations-highlight{
  display:flex; align-items:center; gap:10px;
  background: #f3ecfb; color:#6a3fc2;
  padding:6px 16px 6px 6px; border-radius:999px; font-weight:600; font-size:.9rem;
  margin-bottom:14px; width:fit-content;
}
.trend-icon{
  width:30px; height:30px; flex-shrink:0; border-radius:50%;
  background:#dcc3f5; color:#6a3fc2;
  display:flex; align-items:center; justify-content:center;
}
.trend-icon svg{ width:16px; height:16px; }

.donation-list{ list-style:none; margin:0 0 16px; padding:0; }
.donation-item.hidden-donation,
.support-item.hidden-donation{ display:none; }
.donation-item.hidden-donation.is-visible,
.support-item.hidden-donation.is-visible{ display:flex; }
.donation-item{
  display:flex; align-items:center; gap:12px; padding:10px 0;
  border-bottom: 1px solid var(--border);
}
.donation-item:last-child{ border-bottom:none; }
.donation-meta strong{ display:block; font-size:.95rem; }
.donation-meta span{ color: var(--ink-soft); font-size:.85rem; }

/* ---------- words of support ---------- */
.support{
  background: var(--bg);
  padding: 20px 18px;
  border-top: 8px solid var(--bg-alt);
}
.support-sub{ color: var(--ink-soft); font-size:.9rem; margin:0 0 16px; }
.support-list{ list-style:none; margin:0 0 16px; padding:0; }
.support-item{
  display:flex; gap:12px; align-items:flex-start; padding:14px 0;
  border-bottom: 1px solid var(--border);
}
.support-item:last-child{ border-bottom:none; }
.support-item .avatar{ flex-shrink:0; }
.support-body{ min-width:0; }
.support-meta strong{ display:block; font-size:.95rem; }
.support-meta span{ display:block; color: var(--ink-soft); font-size:.85rem; }
.support-body p{ margin:4px 0 0; font-size:.92rem; line-height:1.45; color: var(--ink); }

/* ---------- organizer card ---------- */
.organizer-card{
  background: var(--bg);
  padding: 20px 18px;
  border-top: 8px solid var(--bg-alt);
}
.organizer-card h2{ font-size:1.2rem; margin-top:0; }
.organizer-row{ display:flex; gap:14px; align-items:flex-start; }
.organizer-row p{ margin:2px 0; color:#1a6f96; font-size:.9rem; }

/* ---------- meta / badges ---------- */
.meta-row{
  background: var(--bg);
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-size:.9rem; color: var(--ink-soft);
}
.dot-sep{ opacity:.6; }
.category-link{ text-decoration: underline; }
.protected-badge{
  display:inline-flex; align-items:center; gap:5px;
  background:#e4f3fb; color:#1a6f96;
  padding:4px 10px; border-radius:999px; font-weight:600; font-size:.82rem;
  margin-left:auto;
}
.report-link{
  display:block; width:100%;
  background: var(--bg); border:none; border-top:1px solid var(--border);
  padding: 18px; text-align:center; color: var(--ink-soft); font-weight:600;
}

/* ---------- trust section ---------- */
.trust-section{
  background: var(--bg-alt);
  padding: 56px 18px;
}
.trust-section h2{
  font-size:1.4rem; font-weight:800; margin-top:0; margin-bottom:32px;
}
.trust-item{
  display:flex; gap:16px; align-items:flex-start; margin-bottom:32px;
}
.trust-item:last-child{ margin-bottom:0; }
.trust-icon{
  width:32px; height:32px; flex-shrink:0; color: var(--ink);
}
.trust-icon svg{ width:100%; height:100%; }
.trust-item strong{ display:block; margin-bottom:4px; font-size:1.02rem; }
.trust-item p{ margin:0; color: var(--ink-soft); font-size:.92rem; line-height:1.45; }
.trust-item p a{ color: var(--ink); text-decoration:underline; }

/* ---------- footer ---------- */
.site-footer{
  background:#fff;
  padding: 30px 18px 100px; /* espaço extra pra não ficar sob a sticky bar */
}
.footer-col{ margin-bottom: 28px; }
.footer-col h4{ margin: 0 0 6px; font-size:1rem; font-weight:800; }
.footer-col a{ display:block; color: var(--ink); padding:9px 0; font-size:.95rem; }
.footer-locale{
  display:flex; align-items:center; justify-content:center; gap:6px;
  border:1px solid var(--border); border-radius:999px;
  padding:9px 14px; width:fit-content; font-size:.88rem; margin: 6px 0 18px;
}
.footer-social{ display:flex; gap:14px; margin-bottom:18px; }
.footer-social a{
  width:34px; height:34px; border-radius:50%; background: var(--ink);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:.9rem;
}
.footer-stores{ display:flex; flex-direction:row; gap:10px; margin-bottom:18px; width:fit-content; }
.store-badge{
  display:flex; align-items:center; gap:7px; line-height:1.15;
  background: var(--ink); color:#fff; border-radius:8px;
  padding:7px 12px; font-size:.62rem;
}
.store-badge svg{ flex-shrink:0; }
.store-badge span{ display:block; }
.store-badge strong{ display:block; font-size:.9rem; font-weight:700; letter-spacing:-0.01em; }
.footer-copy{ color: var(--ink-soft); font-size:.85rem; margin-bottom:10px; }
.footer-legal{ display:flex; flex-direction:column; }
.footer-legal a{
  color: var(--ink); font-size:.88rem; padding:8px 0;
  display:flex; align-items:center; gap:8px;
}
.privacy-choices svg{ flex-shrink:0; }

/* ---------- sticky bottom bar ---------- */
.sticky-bar{
  position: fixed;
  left:12px; right:12px; bottom:12px;
  max-width: calc(var(--max-width) - 24px);
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16), 0 1px 3px rgba(0,0,0,.08);
  padding: 16px 18px;
  display:flex; flex-direction:column; gap:14px;
  z-index: 30;
}
.sticky-top{ display:flex; align-items:center; gap:14px; }
.sticky-info{ flex:1; min-width:0; font-size:.92rem; line-height:1.35; }
.sticky-info strong{ font-size:1.15rem; font-weight:800; }
.sticky-info span{ color: var(--ink-soft); }
.sticky-bar .cta-row{ margin:0; }

/* ---------- checkout modal (mock) ---------- */
.modal-overlay{
  position: fixed; inset:0;
  background: rgba(18,36,28,.5);
  display:none;
  align-items:flex-end;
  justify-content:center;
  z-index: 50;
}
.modal-overlay.open{ display:flex; }

.modal{
  background:#fff;
  width:100%;
  max-width: var(--max-width);
  border-radius: 20px 20px 0 0;
  padding: 22px 18px 26px;
  max-height: 88vh;
  overflow-y:auto;
  position:relative;
  animation: slideUp .25s ease;
}
@keyframes slideUp{
  from{ transform: translateY(30px); opacity:0; }
  to{ transform: translateY(0); opacity:1; }
}
.modal h2{ margin: 4px 0 4px; }
.modal-sub{ color: var(--ink-soft); font-size:.88rem; margin-top:0; }
.modal-close{
  position:absolute; top:16px; right:16px;
  background: var(--bg-alt); border:none; border-radius:50%;
  width:32px; height:32px;
}

.amount-options{
  display:grid; grid-template-columns: repeat(4,1fr); gap:8px;
  margin: 16px 0;
}
.amount-btn{
  background: var(--bg-alt); border:1px solid var(--border);
  border-radius:10px; padding:12px 4px; font-weight:700;
}
.amount-btn.active{
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark);
}

.field{ display:block; margin-bottom:12px; }
.field span{ display:block; font-size:.85rem; font-weight:600; margin-bottom:4px; }
.field input{
  width:100%; padding:11px 12px; border:1px solid var(--border);
  border-radius:10px; font-size:.95rem;
}
.checkbox-field{
  display:flex; align-items:center; gap:8px; font-size:.9rem;
  margin-bottom:18px;
}
.modal-footnote{
  text-align:center; color: var(--ink-soft); font-size:.82rem; margin-top:12px;
}
.modal-error{
  background:#fdecec; color: var(--danger);
  border-radius:8px; padding:10px 12px; font-size:.85rem; margin:0 0 14px;
}

/* ===================== desktop / tablet ===================== */
@media (min-width: 860px){
  :root{ --max-width: 1080px; }

  main{
    display:grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    align-items:start;
    padding-top: 24px;
  }

  .hero, .description, .donations{ grid-column: 1; }
  .progress-block, .organizer-card, .meta-row, .report-link{ grid-column: 2; }

  .hero, .description, .donations, .progress-block, .organizer-card{
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border) !important;
    overflow:hidden;
  }
  .meta-row, .report-link{
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }

  .hero-media{ aspect-ratio: 16/10; }

  /* the curved overlap is a mobile/stacked-layout trick — on desktop the
     hero and progress block are separate side-by-side cards, so undo it */
  .hero-curve{ padding-top:4px; }
  .hero-curve::before{ display:none; }

  .trust-section{ margin-top: 24px; }

  .site-footer{
    display:grid;
    grid-template-columns: repeat(3,1fr) auto;
    gap: 24px;
    align-items:start;
    padding-bottom: 40px;
  }
  .footer-meta{ grid-column: 4; }

  .sticky-bar{ display:none; } /* no desktop o CTA fixo já está no progress-block */
  .cta-row-secondary{ display:none; } /* idem — evita duplicar Donate/Share no desktop */
}
