/* =============================================================================
   DNT Fundraising LP — Base Stylesheet
   Restyled to match enquantohouvervoce.com aesthetic.
   Font: Montserrat — loaded in HTML via Google Fonts, not here.
   Mobile-first, single-column, max-width 672px centered.
   ============================================================================= */


/* =============================================================================
   0. FONT — Self-hosted Montserrat variable (matches reference site)
   ============================================================================= */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/montserrat.woff2) format('woff2');
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');


/* =============================================================================
   1. DESIGN TOKENS
   ============================================================================= */

:root {
  /* --- Brand: Warm Navy & Cream --- */
  --primary:        #283e50;
  --primary-hover:  #1e2f3d;
  --primary-light:  #eef3f6;
  --accent:         #e67e22;
  --accent-hover:   #1e2f3d;

  /* --- Success / Highlight --- */
  --success:        #22c55e;
  --success-hover:  #16a34a;

  /* --- Neutrals --- */
  --bg-page:        #fdf8f3;
  --bg-card:        #fffdf9;
  --bg-input:       #f2f2f2;
  --border:         #e5e5e5;
  --border-light:   #efefef;

  /* --- Text --- */
  --text-main:      #1a1a1a;
  --text-secondary: #666666;
  --text-muted:     #999999;
  --text-fb-blue:   #1a1a1a;

  /* --- Component specifics --- */
  --comment-bg:     #fffdf9;
  --qr-bg:          #ffffff;

  /* --- Radii --- */
  --radius-sm:      0.5rem;
  --radius-md:      0.5rem;
  --radius-lg:      0.5rem;
  --radius-xl:      0.75rem;
  --radius-pill:    9999px;

  /* --- Shadows --- */
  --shadow-card:    0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-footer:  0 25px 50px -12px rgba(0,0,0,.25);
  --shadow-modal:   0 12px 40px rgba(0, 0, 0, 0.18);

  /* --- Transitions --- */
  --transition:     0.15s ease;
}


/* =============================================================================
   2. RESET & BASE
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, 'system-ui', 'Segoe UI',
               Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Leave room for the sticky footer */
  padding-bottom: 110px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
}

/* Remove scrollbar in Chrome/Safari (matches salvewesley pattern) */
::-webkit-scrollbar {
  display: none;
}


/* =============================================================================
   3. LAYOUT — Page wrapper
   ============================================================================= */

/* Narrow single-column container used by <main> */
.page-container {
  max-width: 672px;
  margin: 0 auto;
  padding: 16px;
}


/* =============================================================================
   4. HEADER
   ============================================================================= */

.site-header {
  background-color: var(--primary);
}

.site-header__inner {
  max-width: 672px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header__logo {
  display: block;
  height: 45px;
  width: auto;
}

/* Image logo */
.site-logo__img {
  height: 45px;
  width: auto;
}


/* =============================================================================
   5. HERO IMAGE
   ============================================================================= */

.hero-image {
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}

.hero-image img {
  width: 100%;
  height: auto;
  max-height: 288px;
  object-fit: cover;
  object-position: center top;
}


/* =============================================================================
   6. HEADLINE SECTION
   ============================================================================= */

.headline-section {
  margin-bottom: 16px;
}

.headline-section h1 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 10px;
  text-align: center;
}

.headline-section .subtitle,
.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.625;
  text-align: center;
}


/* =============================================================================
   7. PROGRESS CARD
   ============================================================================= */

.progress-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  padding: 1.25rem;
  margin-bottom: 16px;
}

/* Raised amount + percentage */
.progress-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.progress-card__raised-amount {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 2.25rem;
}

.progress-card__raised-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.25rem;
  margin-top: 4px;
}

.progress-card__percent {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
  line-height: 2rem;
}

.progress-card__percent-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
  line-height: 1rem;
}

/* Progress bar */
.progress-bar-track {
  width: 100%;
  height: 10px;
  background-color: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-pill);
  transition: width var(--transition);
}

/* Stats row (donations count + days left) */
.progress-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.progress-card__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 2rem;
}

.progress-card__stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1rem;
  margin-top: 4px;
}


/* =============================================================================
   8. CTA BUTTON (inline / standalone)
   ============================================================================= */

.cta-button {
  display: block;
  width: 100%;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: background-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
}

.cta-button:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.cta-button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Icon inside CTA */
.cta-button svg,
.cta-button i {
  vertical-align: middle;
  margin-right: 6px;
}


/* =============================================================================
   9. STORY / CONTENT SECTION
   ============================================================================= */

.story-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  padding: 1.5rem;
  margin-bottom: 16px;
}

.story-section h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.35;
}

.story-section p {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.625;
  margin-bottom: 16px;
}

.story-section p:last-child {
  margin-bottom: 0;
}

.story-section strong {
  font-weight: 700;
  color: var(--text-main);
}

/* Inline story images */
.story-image {
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 20px 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.story-image img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.story-image figcaption,
.image-caption {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: 6px;
}

/* Emotional blockquote callout */
blockquote.callout {
  border-left: 4px solid var(--primary);
  padding: 1rem;
  margin: 20px 0;
  background: var(--primary-light);
  border-radius: 0 0.5rem 0.5rem 0;
}

blockquote.callout p {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

blockquote.callout cite {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
  display: block;
}


/* =============================================================================
   10. DONATION GRID — 2 columns × 3 rows (6 tiers)
   ============================================================================= */

.donation-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  padding: 1.5rem;
  margin-bottom: 16px;
}

.donation-section__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 16px;
}

/* 2-column grid that produces 3 rows for 6 buttons */
.donation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* --- Highlighted/anchored tier (e.g. R$50 "mais escolhido") --- */
/* Wrap with .donation-button-wrapper to position the badge */
.donation-button-wrapper {
  position: relative;
}

/* The badge above the highlighted button */
.donation-button-wrapper .most-chosen-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #e67e22;
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
}


/* =============================================================================
   11. COMMENTS SECTION
   ============================================================================= */

.comments-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  padding: 1.5rem;
  margin-bottom: 16px;
}

.comments-section__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.comments-section__count {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Divider above comment list */
.comments-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}

/* Individual comment card */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment__avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  user-select: none;
}

.comment__body {
  flex: 1;
  min-width: 0;
}

.comment__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.comment__time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment__text {
  font-size: 0.875rem;
  color: var(--text-main);
  line-height: 1.55;
  margin-bottom: 8px;
}

.comment__footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment__hearts {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment__hearts .heart-icon {
  color: #ef4444;
  font-size: 0.8125rem;
}

/* Footer note inside comments (e.g. "Comentários via Facebook") */
.comments-plugin-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}


/* =============================================================================
   12. STICKY FOOTER
   ============================================================================= */

.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-footer);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 10px 16px 12px;
}

.sticky-footer__inner {
  max-width: 672px;
  margin: 0 auto;
}

/* Mini progress bar in sticky footer */
.sticky-footer__progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sticky-footer__raised {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
}

.sticky-footer__percent {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sticky-footer__bar-track {
  width: 100%;
  height: 6px;
  background-color: var(--border-light);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 10px;
}

.sticky-footer__bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-pill);
  transition: width var(--transition);
}

/* CTA inside sticky footer */
.sticky-footer .cta-button {
  margin: 0;
  padding: 13px 24px;
}


/* Blink animation for "Aguardando pagamento" status text */
.blink {
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; }
}


/* =============================================================================
   14. DONATION SECTION (inline) — visible card with amount grid
   ============================================================================= */

.donation-section__subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 16px;
}

/* Book image in donation section */
.donation-book-image {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.donation-book-image img {
  width: 12rem;
  height: auto;
}

/* Individual donation-btn (used in donation-grid) */
.donation-btn {
  display: block;
  width: 100%;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition);
  text-align: center;
}

.donation-btn:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  border-color: var(--primary-hover);
}

.donation-btn:active {
  transform: translateY(1px);
}

/* Highlighted button (e.g. "mais escolhido") — same as others */
.donation-btn.highlighted {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.donation-btn.highlighted:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  border-color: var(--primary-hover);
}


/* =============================================================================
   15. PAGE FOOTER (bottom of content, above sticky)
   ============================================================================= */

.page-footer {
  text-align: center;
  padding: 40px 16px 20px;
  max-width: 672px;
  margin: 0 auto;
}

.page-footer__logo {
  max-width: 200px;
  margin: 0 auto 16px;
}

.page-footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.625;
  margin-bottom: 8px;
}

.page-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--transition);
}

.page-footer a:hover {
  text-decoration-color: var(--text-muted);
}

.page-footer .copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* =============================================================================
   16. UTILITY CLASSES
   ============================================================================= */

/* Section spacing helper */
.mb-section { margin-bottom: 16px; }

/* Visually hidden (accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Fully hidden */
.hidden { display: none !important; }


/* =============================================================================
   17. RESPONSIVE — Adjustments for larger screens
   The LP is mobile-first single-column. On larger screens we just center it
   and allow slightly larger type. No two-column layout for content.
   ============================================================================= */

@media (min-width: 672px) {
  .page-container {
    padding: 24px 0;
  }

  .hero-image img {
    max-height: 360px;
  }

  .story-section {
    padding: 1.5rem 2rem;
  }

  .donation-section {
    padding: 1.5rem 2rem;
  }

  .comments-section {
    padding: 1.5rem 2rem;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .blink {
    animation: none;
  }
}


/* =============================================================================
   18. JS BRIDGE — app.js toggles .show class for modal visibility
   ============================================================================= */

#pix-modal.show .modal-backdrop {
  background: rgba(0, 0, 0, 0.70) !important;
}

#pix-modal.show .modal-panel {
  transform: scale(1) !important;
  opacity: 1 !important;
}
